View Single Post
  #4  
Old 01-28-2012, 08:39 AM
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
Bonus: If you want to send an object and it's vars to the client-side you can do it like this:

PHP Code:
function onCreated() {
  
temp.example = new TStaticVar(); // not necessary in this example
  
temp.example."hello ";
  
temp.example."world";
  
temp.example."!";
  
temp.example.b." <3";
  
temp.data temp.example.savevarstoarray(false);
  
findplayer("fowlplay4").triggerclient(this.name"data"temp.data);
}

//#CLIENTSIDE

function onActionClientside() {
  if (
params[0] == "data") {
    
temp.data params[1];
    
temp.example = new TStaticVar();
    
temp.example.loadvarsfromarray(temp.data);
    echo(
temp.example.temp.example.temp.example.temp.example.b.a);
  }

__________________
Quote:
Reply With Quote