31.12.2011, 08:45
What would you recommend for the player from falling objects when not loading? example: That the player would be supported in the air.
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/teleport", cmdtext, true, 10) == 0) // Commannd
{
TogglePlayerControllable(playerid,0); // Freeze the player
SetTimerEx("Freeze", 4000, false, "i", playerid); // Timer for 4 seconds (not repeating timer, only called on the command)
return 1;
}
return 0;
}
forward Freeze(playerid); // forward
public Freeze(playerid) { // callback
TogglePlayerControllable(playerid,1); // after 4 seconds, player is unfrozen
return 1;
}