02.01.2012, 20:03
more than 100% CPU usage?
That is heavy
Well we cant tell you what specific problem there is with ur script but as already mentioned the code u posted is not that "bad" to cause such an usage!
Are u using mysql to save data? If so do u free the result after a SELECT process?
Optimized string lenghts? (would affect ur RAM at the first place) etc.etc.
Well, you definitly shouldnt save players data using the OnPlayerUpdate callback! (as it is executed 32 times per second!!)
If you want to save it also during the gameplay i would suggest you a timer (intervall about 5-15 mins?)
But really check this out my friend
==>https://sampforum.blast.hk/showthread.php?tid=57018
That is heavy
Well we cant tell you what specific problem there is with ur script but as already mentioned the code u posted is not that "bad" to cause such an usage!
Are u using mysql to save data? If so do u free the result after a SELECT process?
Optimized string lenghts? (would affect ur RAM at the first place) etc.etc.
Well, you definitly shouldnt save players data using the OnPlayerUpdate callback! (as it is executed 32 times per second!!)
If you want to save it also during the gameplay i would suggest you a timer (intervall about 5-15 mins?)
But really check this out my friend
==>https://sampforum.blast.hk/showthread.php?tid=57018