new Float:x, Float:y, Float:z;
GetPlayerPos(pID, x, y, z);
if(IsPlayerInAnyVehicle(pID)) SetPlayerPos(playerid, x, y, z+1.6);
else
{
switch(random(3))
{
case 0: SetPlayerPos(playerid, x + 1.5, y, z);
case 1: SetPlayerPos(playerid, x, y + 1.5, z);
case 2: SetPlayerPos(playerid, x+0.7, y+0.7, z+1);
}
}
SetPlayerInterior(playerid, GetPlayerInterior(pID));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
Why do you set player's interior to the same and world to the same?
|
new Float:x, Float:y, Float:z;
SetPlayerInterior(playerid, GetPlayerInterior(pID));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
GetPlayerPos(pID, x, y, z);
if(IsPlayerInAnyVehicle(pID)) SetPlayerPos(playerid, x, y, z+1.6);
else switch(random(3))
{
case 0: SetPlayerPos(playerid, x + 1.5, y, z);
case 1: SetPlayerPos(playerid, x, y + 1.5, z);
case 2: SetPlayerPos(playerid, x+0.7, y+0.7, z+1);
}
new Float:x, Float:y, Float:z;
TogglePlayerControllable(playerid, false);
SetPlayerInterior(playerid, GetPlayerInterior(pID));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
GetPlayerPos(pID, x, y, z);
if(IsPlayerInAnyVehicle(pID)) SetPlayerPos(playerid, x, y, z+1.6);
else switch(random(3))
{
case 0: SetPlayerPos(playerid, x + 1.5, y, z);
case 1: SetPlayerPos(playerid, x, y + 1.5, z);
case 2: SetPlayerPos(playerid, x+0.7, y+0.7, z+1);
}
SetTimerEx("UnfreezePlayer", 1000, false, "i", playerid);
forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid) return TogglePlayerControllable(playerid, true);