View Single Post
  #1  
Old 03-08-2007, 06:18 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
player.attr setting.

I use it for quite alot for things, I thought other people might use it too.
HTML Code:
public function onremoveAttr(attrIndexs)
  for (temp.currentAttr: temp.attrIndexs)
    player.attr[temp.currentAttr] = "";

public function assignAttr(attrData)
  for (temp.playerAttr: temp.attrData[0])
    player.attr[temp.playerAttr] = temp.attrData[1][temp.attrData[0].index(temp.playerAttr)];
How it's used:
PHP Code:
 //Sets individual attrs
  
assignAttr({{23},{"ter_statdisplay.gani"clientr.hp @"/"clientr.maxhp}});
  
this.assignAttr({{attrIndex0attrIndex1}, {attrIndex0 valueattrIndex1 value}})
//Would clear both indexes
  
scheduleevent(5"removeAttr", {23}, "");  //Has a timer of five seconds 
  
this.onremoveAttr({attrIndex0attrIndex1}); //Removes indexs straight away 
Reply With Quote