Thread: player.attr[]
View Single Post
  #10  
Old 12-02-2009, 12:33 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
On Classic I scripted a system to apply and retrieve values to and from designated attribute values, where basically a temporary array consisting of the name, attribute number and default value is looped through when the weapon is created where the necessary data is applied to a static var,
I actually happen to use a player.getAttr("health"); function, aswell as player.setAttr("health", amount);, player.loadDefaultAttr("health");, and player.isDefaultAttr(#) etc.
It can also load designated attributes from other players, and is setup serverside too in order to be synced.

Would be excellent if something like this was built-in but it's not necessary.
Reply With Quote