SA-MP Forums Archive
New odometer Problem - 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: New odometer Problem (/showthread.php?tid=585282)



New odometer Problem - Ugaustin - 12.08.2015

hello, im new to odometer, the more people enter my server the more the odometer goes faster and faster.. everytime I restart server it goes perfect, after 5-6 players enter server the more and fastest odometer goes.

No errors/no Warnings/ a friend gave me the system, and I promised not to give it to anyone!

OnPlayerConnect:


PHP код:
kmtimer[playerid] = SetTimerEx("Odometer"1000true"i"playerid); 



Re: New odometer Problem - Vince - 12.08.2015

I hope you are killing it on disconnect? Although it should probably be set and killed again when a player enters and exits a vehicle, respectively.


Re: New odometer Problem - Ugaustin - 12.08.2015

Someone told me to make OnSecondTimer, and to put it in there

PHP код:
public OneSecondTimer()
                    {
                        for(new 
playeridplayerid MAX_PLAYERSplayerid++)
                        {
                            
kmtimer[playerid] = SetTimerEx("Odometer"50000false"i"playerid);
                            return 
1;
                        }