Revision [831]

This is an old revision of TServerPlayer made by AdminSkyld on 2010-09-19 18:22:23.
 
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]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki