SA-MP Forums Archive
How can i.. - 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: How can i.. (/showthread.php?tid=181343)



How can i.. - Haydz - 05.10.2010

Once a player enters the checkpoint, how can i make him freeze for around 5 seconds

i know i need a timer but don't know how to put it in.

Код:
TogglePlayerControllable(playerid, 0);
(timerstuff)        
TogglePlayerControllable(playerid, 1);
not sure if thats correct but thats as fair i got using the wiki.

any help would be appreciated


Re: How can i.. - CrucixTM - 05.10.2010

pawn Код:
SetTimerEx("freezetimer", 5000, 0, "%d", playerid); // Set the timer where needed

public freezetimer(playerid) // In the bottom of the script. This will simply unfreeze the player after 5 seconds.
{
    TogglePlayerControllable(playerid, 1);
}



Re: How can i.. - willsuckformoney - 05.10.2010

Make sure you

pawn Код:
forward freezetimer(playerid); // Make sure you has that
public freezetimer(playerid) // In the bottom of the script. This will simply unfreeze the player after 5 seconds.
{
    TogglePlayerControllable(playerid, 1);
}



Re: How can i.. - CrucixTM - 05.10.2010

Oh yes, my bad.


Re: How can i.. - Haydz - 05.10.2010

sweet that works, thanks alot man.