[Include] FreezePlayer(playerid, time)
#3

Quote:
Originally Posted by Kayaque
Посмотреть сообщение
How to use
- Simply use FreezePlayer(playerid, seconds);
- After the given seconds the player will be unfreezed.

Areas of use
- Custom interiors
- Admin freezing of players

Comment from scripter
- Nothing special, but useful for those who's new to scripting.
- You can simply see how I put together this tutorial below.

pawn Код:
forward Unfreeze(playerid);
public Unfreeze(playerid)
{
    TogglePlayerControllable(playerid, 1);
    return 1;
}
stock FreezePlayer(playerid, time)
{
    SetTimerEx("Unfreeze", time*1000, false, "u", playerid);
    TogglePlayerControllable(playerid, 0);
    return 1;
}
did you actually test it? as long as I remember I don't see a "u" placeholder in any sa-mp natives...
https://sampwiki.blast.hk/wiki/SetTimerEx
https://sampwiki.blast.hk/wiki/Format
...
Reply


Messages In This Thread
FreezePlayer(playerid, time) - by Kayaque - 29.10.2011, 19:54
Re: FreezePlayer(playerid, time) - by Jochemd - 29.10.2011, 19:57
Re: FreezePlayer(playerid, time) - by Gamer_Z - 29.10.2011, 20:30
Re: FreezePlayer(playerid, time) - by Jochemd - 29.10.2011, 20:32
Re: FreezePlayer(playerid, time) - by Kayaque - 29.10.2011, 21:09
Re: FreezePlayer(playerid, time) - by Gamer_Z - 29.10.2011, 21:33
Re: FreezePlayer(playerid, time) - by Norn - 30.10.2011, 07:24

Forum Jump:


Users browsing this thread: 3 Guest(s)