27.09.2011, 11:02
Hy everybody!
Why does my script takes so much CPU power?
I use following plugins: MySQL by G-Stylezzz and the streamer plugin by icognito.
I checked my strings in help with this tutorial: https://sampforum.blast.hk/showthread.php?tid=55261, i also optimize my strings.
my server allways takes a lot of cpu, when 2 or more players was over 10 minutes connected, i use an Godfather-based script. I allmost rewrite 80% of the complete script. The cpu is most over 20%, my hoster sayed that this isnt ok, otherwise he will take my server down.
Can it possibly be due to the timers? I run the followings (maybe too many?):
The most of my script based on mysql. Anyone have an idea, how to fix that?
thanks.
Why does my script takes so much CPU power?
I use following plugins: MySQL by G-Stylezzz and the streamer plugin by icognito.
I checked my strings in help with this tutorial: https://sampforum.blast.hk/showthread.php?tid=55261, i also optimize my strings.
my server allways takes a lot of cpu, when 2 or more players was over 10 minutes connected, i use an Godfather-based script. I allmost rewrite 80% of the complete script. The cpu is most over 20%, my hoster sayed that this isnt ok, otherwise he will take my server down.
Can it possibly be due to the timers? I run the followings (maybe too many?):
pawn Code:
synctimer = SetTimer("SyncUp", 60000, 1);
othtimer = SetTimer("Timer2", 1000, 1);
unjailtimer = SetTimer("SetPlayerUnjail", 999, 1);
cartimer = SetTimer("CarCheck", 30000, 1);
SetTimer("WantedGo", 1800000, 1);
SetTimer("ShowLotto", 7200000, 1);
checkgastimer = SetTimer("CheckGas", RunOutTime, 1);
thanks.
