How to teleport back to lobby inside a car?
#5

pawn Код:
dcmd_lobby (playerid, params[])
{
    #pragma unused params
    if (!Players[playerid][Derby]) return SendClientMessage(playerid, ERROR_COLOR, "ERROR MESSAGE");

    format(cmdstr, 150, ">> %s has left the Derby", Players[playerid][Name]);
    SendClientMessageToAll(DERBY_COLOR, cmdstr); }

    if(IsPlayerInAnyVehicle(playerid))
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x,y,z);
        SetPlayerPos(playerid, x,y,z+3);
        Players[playerid][Derby] = false;
        SpawnPlayer(playerid);
    }
    else
    {
        Players[playerid][Derby] = false;
        SpawnPlayer(playerid);
    }
    return 1;
}
Sometimes RemovePlayerFromVehicle doesn't work, and if it does it needs some time to take action.
Reply


Messages In This Thread
How to teleport back to lobby inside a car? - by P3DRO - 15.03.2013, 11:21
Re: How to teleport back to lobby inside a car? - by Misiur - 15.03.2013, 13:36
Re: How to teleport back to lobby inside a car? - by P3DRO - 15.03.2013, 21:36
Re: How to teleport back to lobby inside a car? - by P3DRO - 17.03.2013, 14:56
Re: How to teleport back to lobby inside a car? - by kamzaf - 17.03.2013, 22:54
Re: How to teleport back to lobby inside a car? - by P3DRO - 17.03.2013, 23:29

Forum Jump:


Users browsing this thread: 1 Guest(s)