Optimize script
#1

HI,i've downloaded a Samp GM for COD total war but when i put it it takes like 100%cpu usage or 107% so please anyone can help me,please !?
Reply
#2

wut do you want ?
Reply
#3

I guess your host is poor and lacking of CPU.
Have a look on the gamemode itself and seek for mappings / timers which may affect your server's performance.

Could you post your hosts specs as well?
Reply
#4

Quote:
Originally Posted by Michael B
Посмотреть сообщение
I guess your host is poor and lacking of CPU.
Have a look on the gamemode itself and seek for mappings / timers which may affect your server's performance.

Could you post your hosts specs as well?
I am doubtful it's the hosts fault if hes using 100% of a CPU core. He should be able to hold at least 200 players on a optimized gamemode even if it's a crappy Atom 1.6GHz CPU core.

So clearly it's the GM.
Reply
#5

it is GM issue i've like 6timers i think ;-;
are they them ?._. as i am newbie not too good about scripting
Quote:

new Text3Dis[MAX_PLAYERS];
new PingTimer;
new bool:Synching[MAX_PLAYERS];
new FloatPos[MAX_PLAYERS][3];
new FloatHP[MAX_PLAYERS];
new FloatAP[MAX_PLAYERS];
new sWeap[MAX_PLAYERS][13];
new sAmmo[MAX_PLAYERS][13];

or these?
Quote:

new BlipTimer[MAX_PLAYERS];
new JailTimer[MAX_PLAYERS];
new FreezeTimer[MAX_PLAYERS];
new LockKickTimer[MAX_PLAYERS];

Quote:

hosts specs

what do you mean with that?
Reply
#6

Where are you hosting your server at? Also, which gamemode are you actually using?

Quote:
Originally Posted by Jake187
Посмотреть сообщение
I am doubtful it's the hosts fault if hes using 100% of a CPU core. He should be able to hold at least 200 players on a optimized gamemode even if it's a crappy Atom 1.6GHz CPU core.

So clearly it's the GM.
He might be hosting on a 128mb RAM single core VPS along wih MySQL, so that could get him in trouble.
Reply
#7

Gamemode is shit. Has an infinite loop or is wrecking OnPlayerUpdate. Find another gamemode if you can't fix it.
Reply
#8

If it constantly uses 100% of cpu you should check your gamemode first. Looks like there is an infinite loop somewhere inside it.
If you are able to stop SA-MP server with "exit" console command or in any other way which calls OnGameModeExit, I suggest you to use profiler plugin to find a problem (it should point you to a hungry function).
If you can't stop server in regular way (Ctrl+C, "exit", /rcon gmx and so on) and the only way to stop it is to kill a process, you should find another (better) gamemode or try to locate that loop (but it's another topic)
Reply
#9

Quote:
Originally Posted by Michael B
Посмотреть сообщение
He might be hosting on a 128mb RAM single core VPS along wih MySQL, so that could get him in trouble.
Yes but hes stating that the SAMP server is using 100% of the CPU Core so clearly it's his own server causing the problem, it's nobodies fault besides his own and the GM is a piece of crap.
Reply
#10

well,anyone can help me as i am still newbie at scripting not good much i've searched alot and found another one it is like the first one and have the some problem..can anyone fix it ? or atleast tell me things that i can understand or give me some links that might help me,please?,thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)