Timer dont stop sometimes:s
#4

You've never had problems with this timer but have you tested it with more than one person? Reality is that it'll only work for ID 0 and when it's called again by another player it'll actually just run for ID 0 too, so ID 0 will have several timers.

I really don't know why people don't understand this, it's very simple:

pawn Код:
public function(playerid, vehicleid)
{
    printf("The player %d is driving vehicle %d", playerid, vehicleid);
    return 1;
}
Using this timer:

pawn Код:
SetTimer("function", 1000, 0);
Will cause the print to output: The player 0 is driving vehicle 0, this is because you are not passing any data to the callback like it is expecting, so instead it defaults those variables to 0, which is logical and makes sense.

pawn Код:
SetTimerEx("function", 1000, "ii", 24, 50);
This will print: The player 24 is driving vehicle 50, this is because you have actually passed the information that the callback is expecting and it has assigned it to the variables as intended.

Doesn't that make sense to you? If it doesn't I highly suggest starting back at the beginning with the PAWN manuals over at CompuPhase which will teach you basic programming logic.
Reply


Messages In This Thread
Timer dont stop sometimes:s - by Admigo - 16.08.2011, 08:24
Re: Timer dont stop sometimes:s - by JaTochNietDan - 16.08.2011, 09:29
Re: Timer dont stop sometimes:s - by Admigo - 16.08.2011, 10:19
Re: Timer dont stop sometimes:s - by JaTochNietDan - 16.08.2011, 10:24
Re: Timer dont stop sometimes:s - by Admigo - 16.08.2011, 15:00

Forum Jump:


Users browsing this thread: 1 Guest(s)