SA-MP Forums Archive
lag due to too many variable resets? - 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: lag due to too many variable resets? (/showthread.php?tid=300433)



lag due to too many variable resets? - PawnoQ - 30.11.2011

hi,

im just curious if there would be lag possible if i have to reset, lets say about 200 variables to 0 under OnPlayerConnect?
Im refering to [MAX_PLAYERS] variables here. (Cause it had to be performed everytime a player connects)
Lets say the server has a max. capacity of 100 player slots.

Or am i just out of mind?

thx in advance


example:

pawn Код:
new variable[MAX_PLAYERS];

//OnPlayerConnect
variable[playerid]=0;



Re: lag due to too many variable resets? - Finn - 30.11.2011

Not really.

Remember to re-define MAX_PLAYERS. By default it's 500, which is way too much if you have just 100 slots.


Re: lag due to too many variable resets? - PawnoQ - 30.11.2011

ive already redefined MAX_PLAYERS
So there would be no reason to care about lag at this place?

thx