|
|
#1 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Nov 2011
Posts: 395
Reputation: 49
|
My server somtimes get over 80% CPU Usage when 6~8 players are on and auto restarts.
My OnPlayerUpdate : pawn Code:
|
|
|
|
|
|
#2 |
|
Beta Tester
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2008
Location: 629
Posts: 13,627
Reputation: 1937
|
Get the profiler plugin and run it to see what is ACTUALLY causing the problems, rather than just guessing one function is to blame (although you do have a lot of loops in that code).
|
|
|
|
|
|
#3 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Nov 2011
Posts: 395
Reputation: 49
|
Will do, thanks.
|
|
|
|
|
|
#4 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Nov 2011
Posts: 395
Reputation: 49
|
Here you go.
pawn Code:
|
|
|
|
|
|
#5 |
|
Banned
![]() Join Date: Apr 2009
Location: England
Posts: 4,011
Reputation: 701
|
It would be much easier to simply use the streamer plugin to create areas. I don't know if it would help the CPU but it should more efficient than using OnPlayerUpdate.
You can attach dynamic areas to players too so that should be perfect for your use! Incognito's Streamer Plugin |
|
|
|
|
|
#6 | |
|
Huge Clucker
![]() ![]() ![]() Join Date: Nov 2011
Posts: 395
Reputation: 49
|
Quote:
|
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Mar 2008
Posts: 847
Reputation: 72
|
pawn Code:
Taken directly from: http://forum.sa-mp.com/showthread.php?t=102865 |
|
|
|
|
|
#8 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Nov 2011
Posts: 395
Reputation: 49
|
But I'm not using and 'area creating' functions...
|
|
|
|
|
|
#9 |
|
Banned
![]() Join Date: Apr 2009
Location: England
Posts: 4,011
Reputation: 701
|
Using this
pawn Code:
on OnPlayerUpdate is an area, when the player comes within 30 meters they are in that area. But it would be better to just use the streamer areas. |
|
|
|
|
|
#10 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jan 2008
Posts: 1,560
Reputation: 258
|
Fix:
pawn Code:
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] SA:MP Images usage, list and usage. | Partner | Tutorials | 22 | 14/12/2012 11:19 AM |
| Server's Uptime & Players last online time | Luis- | Help Archive | 7 | 31/07/2011 05:45 PM |
| How I can get server's IP | IstuntmanI | Help Archive | 13 | 06/07/2011 01:41 PM |
| Movie Server's | [EDT]Marcus_Von | General | 2 | 19/12/2010 03:05 PM |
| what server's are most popluar? | twinki | Server Support | 20 | 23/12/2009 10:28 AM |