View Single Post
  #23  
Old 02-09-2007, 11:44 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Chompy View Post
Hmm, can you explain what it does?
Still not getting the player.attr[] stuff :[

Got any easier examples?
Sure
HTML Code:
//#CLIENTSIDE
function onCreated()
{
  player.attr[3] = "bombermad_bomb.gani";
}
Would make the bombermad gani display over your graal character. Well, if you were to have that gani that is.

HTML Code:
//#CLIENTSIDE
function onPlayerChats()
{
  if (player.chat == ":setAttr")
  {
    temp.curAttr = player.chat.substring(8, 1);
    temp.curGani = player.chat.substring(9).trim();
    player.( @ "attr[" @ temp.curAttr @ "]") = (temp.curGani.ends(".gani")? temp.curGani: temp.curGani @ ".gani");
  }
}
:setAttr 3 myGani.gani
choose a gani from inside of your graal folder, which is a solid object for example.

Edit: I'll write a few documents explaining the advantages to using player attributes.

Last edited by Chandler; 02-09-2007 at 11:56 PM..
Reply With Quote