Quote:
Originally Posted by dark_style
Note that if he uses get_maxplayers(), he should use it like that:
PHP Code:
new i_MaxPlayers = get_maxplayers();
for( new id = 1; id <= i_MaxPlayers; id++ )
|
This is a bad way, get_players should always be used, so you directly get a list (filled in players[32] array) of connected players.
With the other method, on each iteration you need to check if the player is connected, which is bad for performances.
Also get_players lets you add the "a" flag to retrieve only alive player that improve performances in the same way that having to put is_user_alive on each iteration.
__________________