SA-MP Forums Archive
Question with crash. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question with crash. (/showthread.php?tid=387253)



Question with crash. - AliveBG - 23.10.2012

Many people on my server got crash. I think that this gives crash.
Any ideas?
PHP код:
new engandlialwayson;
forward EngineAndLightsTurnedOn();
// OnGameModeInit
engandlialwayson SetTimer("EngineAndLightsTurnedOn"100001);
// OnGameModeExit
KillTimer(engandlialwayson);
public 
EngineAndLightsTurnedOn()
{
     for(new 
0MAX_VEHICLESi++)
     {
          
GetVehicleParamsEx(ienginelightsalarmdoorsbonnetbootobjective);
          
SetVehicleParamsEx(i11alarmdoorsbonnetbootobjective);
     }
     return 
1;




Re: Question with crash. - AIped - 23.10.2012

Well...timers could cause bugs if they arent proper used. what does your function do if i may ask ?


Re: Question with crash. - AliveBG - 23.10.2012

I think sometimes people are crashed because this script.


Re: Question with crash. - AIped - 23.10.2012

Quote:
Originally Posted by AliveBG
Посмотреть сообщение
I think sometimes people are crashed because this script.
Could be but i want to know what this part of your script do so i could further help you by telling you to script it
in any other way then this. And so there wont be any crash


Re: Question with crash. - AliveBG - 24.10.2012

Hmm, maybe going from lag. When I increased the timer to 8 seconds, for now people don't have crashes.