Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   player.attr setting. (https://forums.graalonline.com/forums/showthread.php?t=72677)

Chandler 03-08-2007 06:18 PM

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 



All times are GMT +2. The time now is 02:21 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.