#1

Can anyone tell me about pVars? What is it?

- Thank you.
Reply
#2

https://sampwiki.blast.hk/wiki/Per-player_variable_system
Reply
#3

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"
Reply
#4

Oh. What is best to use? "new" variables or pVars?
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)