[Tutorial] PVars - when, and when not, to use them
#2

Good thing this was re-posted. I was going to start a discussion about this but since ****** removed all his posts, they're gone sorta.

Anyway, let's say I have a variable at the script, but this variable is used at very very rare occurances, as in, usually only one or two players have a unique number while the rest of the players have this variable set to 0.

At this case, isn't it logical for you to use a PVar? You can create a variable for your MAX_PLAYERS, but most players will have this set to 0, this will use extra memory. But you can create this variable for only those players who have a unique number stored, reserving a lot of memory depending your max_players define, am I right? So it does make the PVars helpful, doesn't it?

I also noticed you can get and set pvars ingame dynamically (http://pastebin.com/dvgQWMfu). Please add this to the benefits list.
Reply


Messages In This Thread
PVars - when, and when not, to use them - by corne - 15.04.2015, 18:29
Re: PVars - when, and when not, to use them - by Tamer - 23.04.2015, 21:23

Forum Jump:


Users browsing this thread: 2 Guest(s)