GetPlayerInterior
#8

That should work...
pawn Код:
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);
    }
Otherwise, if you really want to make it foolproof:
pawn Код:
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);
At the bottom of your script:
pawn Код:
forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid) return TogglePlayerControllable(playerid, true);
--

If that doesn't work, the problem is with WHERE you are teleporting the player in terms of the bot, you could be teleporting outside the interior's walls etc, or the interior itself might not be solid. (For whatever reason that might be...)
Reply


Messages In This Thread
GetPlayerInterior - by Ananisiki - 24.05.2014, 00:47
Re: GetPlayerInterior - by zPain - 24.05.2014, 01:32
Re: GetPlayerInterior - by Ananisiki - 26.05.2014, 21:04
Re: GetPlayerInterior - by Ananisiki - 27.05.2014, 21:17
Re: GetPlayerInterior - by kamiliuxliuxliux - 27.05.2014, 22:33
Re: GetPlayerInterior - by Ananisiki - 28.05.2014, 00:29
Re: GetPlayerInterior - by kamiliuxliuxliux - 28.05.2014, 18:46
Re: GetPlayerInterior - by Threshold - 28.05.2014, 23:22

Forum Jump:


Users browsing this thread: 1 Guest(s)