SA-MP Forums Archive
Is this possible - 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: Is this possible (/showthread.php?tid=81650)



Is this possible - JoeDaDude - 12.06.2009

Is it possible to freeze someone for amount of time without timer?
As its kinda hard for me to make the tazer unfreeze after 10 seconds,
As on the timer i dont know how to make the script find the id used when said /taze


Re: Is this possible - MenaceX^ - 12.06.2009

What should be so hard?
You set a timer (ex) for 10000 milliseconds, for playerid (i/d)
then you unfreeze the player..


Re: Is this possible - JoeDaDude - 13.06.2009

Quote:
Originally Posted by MenaceX^
What should be so hard?
You set a timer (ex) for 10000 milliseconds, for playerid (i/d)
then you unfreeze the player..
Thats exactly what im doing but it dosent know what id im typing,
It sends everyone a message saying that they've been uncuffed


Re: Is this possible - ZaZa - 13.06.2009

The variable must be passed using SetTimerEx(), like this:
Код:
// cuff command
SetTimerEx("unCuff", 10000, false, "i", giveplayerid);
Assuming that the ID you specify as a cuffer is "giveplayerid", just replace it with your own instance.
Код:
forward unCuff(playerid);
public unCuff(playerid)
{
  // uncuff it here
}
As simple as that.