SA-MP Forums Archive
Question Info: PVar or classic array with MAX_PLAYERS - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question Info: PVar or classic array with MAX_PLAYERS (/showthread.php?tid=358454)



Question Info: PVar or classic array with MAX_PLAYERS - Speed++ - 10.07.2012

what is better?

PVar or classic array method with MAX_PLAYERS ?

suggest...


Re: Question Info: PVar or classic array with MAX_PLAYERS - Riddick94 - 10.07.2012

enum


Re: Question Info: PVar or classic array with MAX_PLAYERS - Kirollos - 10.07.2012

i prefer array & enum , like this

pawn Код:
enum PlayerData
{
score,
Float:health,
Float:armour
};
new PlayerInfo[MAX_PLAYERS][PlayerData];



Re: Question Info: PVar or classic array with MAX_PLAYERS - Vince - 10.07.2012

We have been over this many times. PVars are much slower and they should only be used to share data across scripts.


Re: Question Info: PVar or classic array with MAX_PLAYERS - Larceny - 10.07.2012

https://sampforum.blast.hk/showthread.php?tid=268499