Quote:
Originally Posted by Santaaa
So this is a correct loop?
PHP Code:
for (new i = 1; i <=get_maxplayers(); i++)
|
No. You are calling get_maxplayers() n * p times, where n is the number of times the containing function is called and p is the number of players in the server.
get_maxplayers() is never going to change after the plugin is loaded, so you only need to call it one time per map (hence why I said use plugin_init()).
Store the value in a global variable like I said to do.
__________________