Can someone tell me how to freeze player at spawn ?
#5

Use a timer.

pawn Код:
forward UnfreezePlayer(playerid); // top of script
pawn Код:
public UnfreezePlayer(playerid) // Anywhere in the script as long it isn't in a callback.
{
     if(IsPlayerConnected(playerid))
     {
          TogglePlayerControllable(playerid,1);
     }
     return 1;
}
pawn Код:
public OnPlayerSpawn(playerid) // Your OnPlayerSpawn Code
{
    TogglePlayerControllable(playerid, 0);
    SetTimerEx("UnfreezePlayer", 3000, false, "d", playerid);
    return 1;
}
And that's that.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)