Posts: 698
Threads: 107
Joined: Mar 2010
Reputation:
0
Can anyone tell me about pVars? What is it?
- Thank you.
Posts: 1,418
Threads: 63
Joined: Dec 2010
Reputation:
0
SetPVar Int/String/Float(playerid, pvar, value);
playerid: The player id
pvar: for example "Money" or "Ammo" with "" !
value: The value to assign to that var
example:
SetPVarInt(playerid, "Money", GetPlayerMoney(playerid));
it's the same thing as
new Money[MAX_PLAYERS];
Money[playerid] = GetPlayerMoney(playerid);
But with PVars you don't have to declare with "new"
Posts: 698
Threads: 107
Joined: Mar 2010
Reputation:
0
Oh. What is best to use? "new" variables or pVars?
Posts: 2,726
Threads: 85
Joined: Jul 2010
Reputation:
0
Non of them are best to use, still I would go with normal variables ( "new" ). Because they are faster than pVars. pVars = Smaller AMX size, but slower, Normal variables = Bigger AMX size, faster.
So, I never cared about AMX size, so I go with normal variables.