Timer goes to fast
#1

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?
Reply
#2

i belive it doesnt goes fast...
Reply
#3

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.
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)