24.07.2012, 09:30
nothing wrong with the OPU, its so small, any server could handle those few lines with 5000 players. it seems that your script is looping/lagging somewhere else.
to spot the function causing trouble, have a look at the plugins-section, and grab the profiler plugin. once installed, let it profile the gamemode for some minutes (not at the public server please, the plugin eats a lot of RAM depending on your gamemode).
oh, when you got results: its not the callback being called most often, its the one which needs the most CPU time per call.
btw: to check if a player HOLDS a minigun, sholdnt be the problem, why dont you move that check to OnPlayerKeyStateChange? a minigun is harmless as long it aint fired, so just when a player wants to shoot with it, ban him. this will save your script a lot of work (100 players*25 fps=2500 loops per second..)
to spot the function causing trouble, have a look at the plugins-section, and grab the profiler plugin. once installed, let it profile the gamemode for some minutes (not at the public server please, the plugin eats a lot of RAM depending on your gamemode).
oh, when you got results: its not the callback being called most often, its the one which needs the most CPU time per call.
btw: to check if a player HOLDS a minigun, sholdnt be the problem, why dont you move that check to OnPlayerKeyStateChange? a minigun is harmless as long it aint fired, so just when a player wants to shoot with it, ban him. this will save your script a lot of work (100 players*25 fps=2500 loops per second..)