View Single Post
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-27-2015 , 17:56   Re: Dynamic Objects and Properties
Reply With Quote #20

To check if a object is valid use...

Code:
if (player.IsValid)


You also need to Dispose() your object OnClientDisconnect. These objects are not managed and will cause memory leaks if not disposed of correctly.

Code:
player.Dispose();


GetInt() already supports default values as the second parameter.

Code:
int defaultvalue = player.GetInt ("notset", 123);
__________________
Neuro Toxin is offline