Timer goes to fast - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Timer goes to fast (
/showthread.php?tid=133597)
Timer goes to fast -
KuHS - 13.03.2010
Hello, im using SetTimerEx in my gamemode, it activates when player connects to the game. Basically timer goes 60 seconds, but sometimes it's shorter than 60 seconds, it can be up to 30-40 seconds, but i won't change timer time.
Variable:
Код:
new game[MAX_PLAYERS];
This is how looks the timer. It's on OnPlayerConnect callback:
Код:
game[playerid]=SetTimerEx("Games",60000,true,"i",playerid);
OnPlayerDisconnect:
Код:
KillTimer(game[playerid]);
Callback "Games" also have one return at starting, and it has a long process:
Код:
public Games(playerid)
{
if(playerDB[playerid][authstate]==0) return;
// When goes ~350 lines this callback code without return
Any ideas, what can be wrong?
Re: Timer goes to fast -
SlashPT - 13.03.2010
i belive it doesnt goes fast...
Re: Timer goes to fast -
KuHS - 13.03.2010
I dont know what's wrong, but i can give you an example. Im driving any big vehicle, and it uses 5 litres fuel/1 minute. The fuel system based on this timer, i drove this big vehicle about 3 minutes, and i had about 25 litres fuel only, and there was 50 litres at starting? Normal? Nop, in 3 minutes the fuel would be about 35 litres 3*5=15, but it happens like i said.
Re: Timer goes to fast -
¤Adas¤ - 13.03.2010
It is probably a SA-MP bug. I know about something like that... On my computer all timers go okay, but on some machines they are a bit faster.