02.08.2016, 14:06
How to freeze player for 3 seconds? I know, that freeze player with TogglePlayerControllable(playerid,0); , but how for 3 secs?
SetTimerEx("Player_Frozen", 3000, false, "i", playerid);
forward Player_Frozen(playerid);
public Player_Frozen(playerid) {
TogglePlayerControllable(playerid, 1);
return 1;
}
//You code......
TogglePlayerControllable(playerid, false);
SetTimerEx("UnfreezePlayer", 3000, false, "i", playerid);
forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid)
{
return TogglePlayerControllable(playerid, true);
}