CPU Usage Spike [URGENT]
#7

Quote:
Originally Posted by Darklom
Посмотреть сообщение
Thanks, i'll have a look at that. Is it possible for a sudden spike though, as you said maybe it would be the looping through all the players?
A CPU spike would definitely happen if you are looping through all the players and doing a lot of slow stuff inside those loops. I used to get carried away w/ foreach statements and getting vehicle id's etc. Now each player gets a variable that maintains their state (onfoot, dead, driving, etc) and that variable changes in onplayerstate only. That way, instead of using GetPlayerVehicleID inside loops, I check pstate[playerid] instead. Thing like that could streamline your player-checks a bit. I don't know if thats your problem per se, but if it is, this might help.
Reply


Messages In This Thread
CPU Usage Spike [URGENT] - by Darklom - 13.05.2012, 03:41
Re: CPU Usage Spike [URGENT] - by Ballu Miaa - 13.05.2012, 03:45
Re: CPU Usage Spike [URGENT] - by kaisersouse - 13.05.2012, 04:08
Re: CPU Usage Spike [URGENT] - by Ballu Miaa - 13.05.2012, 04:10
Re: CPU Usage Spike [URGENT] - by kaisersouse - 13.05.2012, 04:10
Re: CPU Usage Spike [URGENT] - by Darklom - 13.05.2012, 04:12
Re: CPU Usage Spike [URGENT] - by kaisersouse - 13.05.2012, 04:17
Re: CPU Usage Spike [URGENT] - by AndreT - 13.05.2012, 06:52
Respuesta: CPU Usage Spike [URGENT] - by admantis - 13.05.2012, 22:53
Re: CPU Usage Spike [URGENT] - by kvsolga - 13.05.2012, 23:51

Forum Jump:


Users browsing this thread: 5 Guest(s)