View Single Post
Author Message
ceribik
SourceMod Donor
Join Date: Dec 2007
Old 12-26-2011 , 23:05   Best way to store variables relating to players?
Reply With Quote #1

I'm used to OOP languages where I can do stuff like:
Code:
player.MyVar = blah
But as far as I can tell, there's no equivalent way to do this in SoucePawn (besides keyvalues, but their use is limited).

The next best thing I could think of is to store the info in arrays, but that would require over a dozen arrays per person and it would be a PITA to manage them as players constantly connect and disconnect.

(on that note, are there multidimensional arrays in sourcepawn, e.g. array[foo][bar]? )

Is there a better way of handling this?


Cheers.

Last edited by ceribik; 12-26-2011 at 23:06.
ceribik is offline