if(IsPlayerInAnyVehicle(playerid))
#2

pawn Код:
SetPlayerOrVehiclePos(playerid, Float:x, Float:y, Float:z) //A function to teleport a player checking if he's on foot or in a vehicle
{
    if(IsPlayerInAnyVehicle(playerid)) //If player is in a vehicle
    {
        SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); //Teleport vehicle(will also teleport the player alongside)
    }
    else //If he isn't in a vehicle
    {
        SetPlayerPos(playerid, x, y, z); //Teleport him alone
    }
    return true;
}
Reply


Messages In This Thread
if(IsPlayerInAnyVehicle(playerid)) - by Zeus666 - 27.10.2018, 18:30
Re: if(IsPlayerInAnyVehicle(playerid)) - by RogueDrifter - 27.10.2018, 18:39
Re: if(IsPlayerInAnyVehicle(playerid)) - by ReD_HunTeR - 27.10.2018, 18:44
Re: if(IsPlayerInAnyVehicle(playerid)) - by RogueDrifter - 27.10.2018, 18:55

Forum Jump:


Users browsing this thread: 1 Guest(s)