27.07.2014, 21:54
Hello, so I was messing around with the SetTimerEx function, while I create this CMD:
the callback:
while I'm testing the code in game, it ended up like
while it's supposed to increase one by one every one second, any explanations?
pawn Код:
CMD:lol(playerid, params[])
{
testtimer[playerid] = SetTimerEx("EndTiming", 1000, true, "d", playerid);
}
pawn Код:
forward EndTiming();
public EndTiming()
{
for(new i=0; i < MAX_PLAYERS; i++)
{
new t;
new string[32];
t+=1;
format(string, sizeof(string), "t=%d", t);
SendClientMessage(i, -1, string);
}
}
Код:
[04:58:36] t=1 [04:58:37] t=1 [04:58:38] t=1 [04:58:39] t=1 [04:58:40] t=1 [04:58:41] t=1 [04:58:42] t=1 [04:58:43] t=1 [04:58:44] t=1 [04:58:45] t=1