[Help] UnfreezeTimer - 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: [Help] UnfreezeTimer (
/showthread.php?tid=189076)
[Help] UnfreezeTimer -
MartinDee - 10.11.2010
Hello.. I was making unfreeze timer when people enter building and after timer ends.. server unfreeze him.
pawn Код:
forward UnfreezeTimer( playerid );
public UnfreezeTimer( playerid )
{
TogglePlayerControllable(playerid, true);
return 1;
}
// this goes under OnPlayerKeyStateChange
if(IsPlayerInRangeOfPoint( playerid, 2, 1772.0117, -1548.0527, 9.9070) )
{
SetPlayerPos( playerid, 2534.3948, -1366.6055, 1041.4506);
SetPlayerInterior( playerid, 2);
TogglePlayerControllable(playerid, false);
SetTimer("UnfreezeTimer", 3000, false);
}
If one player enter and 2nd enter after him.. server unfreezes player who entered 2nd and 1st is frozen perm.
Whats wrong?
Re: [Help] UnfreezeTimer -
MartinDee - 10.11.2010
Up...
Is there anyone who can really help?
Re: [Help] UnfreezeTimer -
Lenny the Cup - 10.11.2010
You have to pass the player's ID by reference, see this:
https://sampwiki.blast.hk/wiki/SetTimerEx
And don't forget to kill the timer when it's done what it's supposed to do!
Re: [Help] UnfreezeTimer - lameguy - 10.11.2010
Use:
Код:
SetTimerEx("UnfreezeTimer", 3000, false, "d", playerid);