Posts: 78
Threads: 7
Joined: May 2013
Reputation:
0
Hello for everyone, who is reading that.
Sorry for poor english, but I need to ask and get an answer.
Which one will be better for server, u think and why?
For every 1 player = 1 player timer (like SetTimerEx for every1)
Or for all = 1 global timer (SetTimer and there foreach( )
Thanks for answers.
Posts: 2,593
Threads: 34
Joined: Dec 2007
global timer + foreach, why? you dont need use KillTimer everytime when player disconnect
you dont need update in one time all players, you can use one array + gettime/gettick
Posts: 791
Threads: 113
Joined: Aug 2008
Reputation:
0
I can't figure out anything at all that would need an active timer at all times for all players.
If you want to check if player is in car, use OnPlayerStateChange.
Posts: 1,773
Threads: 47
Joined: Jan 2015
Reputation:
0
Per player timer would be lot faster. Make sure you have the proper RAM to run that much of timers or otherwise use the second option.
Posts: 1,830
Threads: 49
Joined: Nov 2014
Reputation:
0
Yes, because the foreach loop has to loop all the codes 500 times anyways.
Using SetTimerEx when the player connects means that the code gets executed at different times, and therefore does not have to loop all the code 500 times at the same time.