Posts: 429
Threads: 60
Joined: May 2010
Reputation:
0
Well im currently using a GF edit and when we reach like 70+ players the server restarts a few times in a day, i thought that it was my script so i changed to another GF edition that a comunity used the reached 150 every day, but still resets due to CPU usage so the fault is from the hosting, do i have to host on VPS to get this restarts out? or a dedicated server? :S
Posts: 518
Threads: 17
Joined: Oct 2006
Reputation:
0
'Another GF edition' and you're wondering why you are using a lot of CPU? GF is horribly scripted and is known for using way too much CPU, especially in the gamemodes that use 'OnPlayerUpdate' for saving player files.
Posts: 429
Threads: 60
Joined: May 2010
Reputation:
0
Yeah i know that but what could i do to make less the CPU usage?
Posts: 429
Threads: 60
Joined: May 2010
Reputation:
0
What does changin OnPlayerUpdate to OnPlayerUpdateEx makes difference? o.o
Posts: 429
Threads: 60
Joined: May 2010
Reputation:
0
Yeah i know but is OnPlayerUpdateEx another native fixed or something like that? cause i saw this on ravens roleplay script.
Posts: 518
Threads: 17
Joined: Oct 2006
Reputation:
0
OnPlayerUpdate can be renamed to anything you wish, e.g. 'updatePlayer', 'writeFiles', whatever. If you rename it, it wont be called by SA-MP any more.
Posts: 429
Threads: 60
Joined: May 2010
Reputation:
0
ok thanks now i got it, im currently using OnPlayerUpdate just for a sleep system, so it changes the bar textdraw depending the ammount of sleep the players has, could i change that OnPlayerUpdate to OnPlayerUpdateEx and still workings fine?