How to do this when in vehicle?
#1

pawn Код:
CMD:eject(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle to use this command");
    else
    {
    SetPlayerVelocity(playerid,0.0,0.0,5.0);
    }
    return 1;
}
That dosent work, So i tried

pawn Код:
CMD:eject(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle to use this command");
    else
    {
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(playerid, x, y, z);
    SetPlayerVelocity(playerid,0.0,0.0,5.0);
    }
    return 1;
}
That dosent work either
So i tried..

pawn Код:
CMD:eject(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle to use this command");
    else
    {
    RemovePlayerFromVehicle(playerid);
    SetPlayerVelocity(playerid,0.0,0.0,5.0);
    }
    return 1;
}
Still not working So how would i do this right?
Reply


Messages In This Thread
How to do this when in vehicle? - by Torran - 25.02.2010, 14:35
Re: How to do this when in vehicle? - by Virtual1ty - 25.02.2010, 14:41
Re: How to do this when in vehicle? - by Torran - 25.02.2010, 14:43
Re: How to do this when in vehicle? - by aircombat - 25.02.2010, 16:06
Re: How to do this when in vehicle? - by Kurence - 25.02.2010, 16:08
Re: How to do this when in vehicle? - by Torran - 25.02.2010, 16:13
Re: How to do this when in vehicle? - by Torran - 25.02.2010, 16:14

Forum Jump:


Users browsing this thread: 1 Guest(s)