SA-MP Forums Archive
SetTimer Question - 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: SetTimer Question (/showthread.php?tid=399929)



SetTimer Question - WinterAce - 16.12.2012

I have set these three timers to show the following things when entering a vehicle;
Amount of fuel, vehicle name and the speed.

pawn Код:
SetTimer("SpeedTimer", 80, true);
    SetTimer("FuelTima", 80, true);
    SetTimer("VehicleTima", 80, true);
My game mode is currently being hosted and not laggy at all but I am just wondering when more players join will it start lagging loads having these timers?


Re: SetTimer Question - Mike_Peterson - 16.12.2012

Well timers set to 80 ms are quite demanding, so I hope for you that your server is well enough to handle that.


Re: SetTimer Question - WinterAce - 16.12.2012

Yeah I have a good host so hopefully it'll be ok, just wanted to check whether timers could cause lag. Thanks.


Re: SetTimer Question - Konstantinos - 16.12.2012

I'm sure it will, if there are more than 50-100 players online and most of the people try to avoid not to use lower than 500 ms. The timer to 1000 ms will be just fine.


Re: SetTimer Question - ikey07 - 16.12.2012

Depends on what you will do under these timers, and you want to start them each time someone connect, or they are global timers with loop inside?


Re: SetTimer Question - [DOG]irinel1996 - 16.12.2012

As I see all them repeat each 80ms, use just one, not three. Do everything in one callback.


Re: SetTimer Question - Mean - 16.12.2012

Well it definitely can't be ideal, but it could work. Try it first.