Usage
Syntax: new TServerPlayer("account")
Explanation
TServerPlayer is the class, derived from TGaniObject, from which NPCs (including GUI scripts) as well as players (i.e., your character) are created.
Example
Construction of a stand-alone TServerPlayer object is impossible, but the properties of an offline player can be loaded this way.
function onCreated() { temp.pl = new TServerPlayer("account"); temp.hat = temp.pl.attr[2]; temp.pl.destroy(); }
WARNING: When creating TServerPlayer objects to read offline attributes, you MUST destroy the TServerPlayer object when you are finished with it because it will not be deleted automatically by the garbage collector. If you do not destroy the objects, it will result in a memory leak and then bad things will happen.
Categories
CategoryClassObject
There is one comment on this page. [Display comment]