20.11.2012, 03:38
Hey guys, I've created a command to teleport someone into an interior, but the objects dont load quick enough, and the person falls through the ground, What would if i have to add to freeze them for about 3 seconds?
if(strcmp(cmd, "/az", true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pGM] >= 4 || IsPlayerAdmin(playerid)) { SetPlayerPos(playerid, 1323.8557, 238.8070, 1600.4843); TogglePlayerControllable(playerid, 0); SetTimerEx("UnfreezePlayer", 3000, false, "i", playerid); } return 1; }
forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid)
{
TogglePlayerControllable(playerid,1);
return 1;
}
if(strcmp(cmd, "/az", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pGM] >= 4 || IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid, 1323.8557, 238.8070, 1600.4843);
TogglePlayerControllable(playerid, 0);
SetTimerEx("UnfreezePlayer", 3000, false, "i", playerid);
}
return 1;
}
forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid)
{
TogglePlayerControllable(playerid,1);
return 1;
}