How can i make player freeze on spawn for about 5 seconds?
#4

pawn Код:
public OnPlayerSpawn(playerid)
{
    TogglePlayerControllable(playerid, false); // Freeze the player
    SetTimerEx("Unfreeze", 5000, false, "i", playerid); // Make a 5 second timer for that player to get unfrozen
    return 1;
}

forward Unfreeze(playerid);
public Unfreeze(playerid)
{
    TogglePlayerControllable(playerid, true); // Unfreeze the player after 5 seconds
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)