25.08.2009, 12:31
Thanks y_less, zcmd looks a little confusing for me, but so did sscanf and dcmd at first. I'll look into it and start using it.
As for CPU, there is random spikes sometimes, then it settles down again. I'll add some delays for some commands, with settimerex. Stopping a player spamming or over using certain commands.
I have under OnPlayerUpdate added some code to check a players interior. Could that be a cause of high CPU usage?
Theres only two things in OnPlayerUpdate.
One to stream the object, with kc's streamer. And the second is checking a players interior, and setting them on the same team, so they cant kill eachother.
I've also noticed that IRC commands sometimes cause the server to crash. especially !players right now there are 41 players, and when i do !players in irc, it shows the list of players the crashes the server.
EDIT: Would probably help if i included the code
http://pastebin.com/m2c29a602
31 players, CPU: 25.6%, RAM: 1.3%
As for CPU, there is random spikes sometimes, then it settles down again. I'll add some delays for some commands, with settimerex. Stopping a player spamming or over using certain commands.
I have under OnPlayerUpdate added some code to check a players interior. Could that be a cause of high CPU usage?
Theres only two things in OnPlayerUpdate.
One to stream the object, with kc's streamer. And the second is checking a players interior, and setting them on the same team, so they cant kill eachother.
I've also noticed that IRC commands sometimes cause the server to crash. especially !players right now there are 41 players, and when i do !players in irc, it shows the list of players the crashes the server.
EDIT: Would probably help if i included the code
http://pastebin.com/m2c29a602
31 players, CPU: 25.6%, RAM: 1.3%