Freeze and unfreeze - 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: Freeze and unfreeze (
/showthread.php?tid=236590)
Freeze and unfreeze -
Stefans94 - 07.03.2011
Hello,
Can anyone help me with a working code for this:
When someone enters the checkpoint he needs to freeze for 5 seconds..
And than unfreeze with a message on his screen..
I know i can find the functions on the wiki, but i always use them wrong..
So if anyone please can make a working example for me.
Thanks
Re: Freeze and unfreeze -
Mauzen - 07.03.2011
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
TogglePlayerControllable(playerid, false);
SetTimerEx("UnfreezePlayer", 5000, 0, "i", playerid);
}
forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid)
{
TogglePlayerControllable(playerid, true);
// + whatever you want to do else
}
Here, but do not just copy and paste it, but use it to learn
Re: Freeze and unfreeze -
Stefans94 - 07.03.2011
Thanks it works!