View Single Post
  #2  
Old 10-08-2011, 09:00 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
It's better to avoid to using long amounts of data in client flags because they get truncated/cut-off in external RC.

You could store them like this:

clientr.hat.Egghat = "hat2.png";

Then to display them:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  echo(
"Hats");
  for (
temp.hatgetstringkeys("clientr.hat.")) {
    
temp.hat_image clientr.hat.(@temp.hat);
    echo(
format(" - %s: %s"temp.hattemp.hat_image));
  }

Adding a hat would be easy as putting this in your player joined class:

PHP Code:
public function addHat(hat_namehat_image) {
  
clientr.hat.(@hat_name) = hat_image;

and calling:

player.addHat("Egg Hat", "hat2.png");

This is basically an item system.
__________________
Quote:
Reply With Quote