SA-MP Forums Archive
Timer Not Working - 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: Timer Not Working (/showthread.php?tid=324358)



Timer Not Working - acade - 09.03.2012

It freezes you but once you get tp'd it doesn't unfreeze you.

pawn Код:
TogglePlayerControllable(playerid,0);
SetTimer("bankunfreeze", 5000, false); // 5 Seconds

public bankunfreeze(playerid)
{
    TogglePlayerControllable(playerid,1);
}
It is also forwarded
pawn Код:
forward bankunfreeze(playerid);



Re: Timer Not Working - Twisted_Insane - 09.03.2012

pawn Код:
forward bankunfreeze(playerid);
public bankunfreeze(playerid)
{
   KillTimer(bankunfreeze[playerid]);
   TogglePlayerControllable(playerid, 1);
}



Re: Timer Not Working - acade - 09.03.2012

Oh thanks totally forgot to kill it *facepalm*

+rep!