if(IsPlayerInVehicle(playerid, ID))
#1

Im trying to make a cmd only able when in vehicleid 476, but it still works in all vehicles, how come?
i have tried this, but then it doesnt work at all
pawn Код:
if(IsPlayerInVehicle(playerid, 476))
But with this it does work..in ALL vehicles and not just in ID 476
pawn Код:
if(!IsPlayerInVehicle(playerid, 476))
This is the commands, and they are dont being restricted to ID 476 as it should be, they works in all vehicles.
CODE:
pawn Код:
COMMAND:unload(playerid,vehicleid, params[])
{
    if(!IsPlayerInVehicle(playerid, 476))
    {
        new id = GetPlayerVehicleID(playerid);
        DestroyObject(VehicleBomb[id][0]);
        DestroyObject(VehicleBomb[id][1]);
        VehicleFire[vehicleid] = 1;
    }
    return 1;
}
COMMAND:load(playerid,vehicleid, params[])
{
    if(!IsPlayerInVehicle(playerid, 476))
    {
        new id = GetPlayerVehicleID(playerid);
        new
            Float:x,
            Float:y,
            Float:z;

        GetPlayerPos(playerid,x,y,z);

        AddVehicleMissiles(id,2.0,-1.05,0.0);
    }
    return 1;
}
Reply


Messages In This Thread
if(IsPlayerInVehicle(playerid, ID)) - by cruising - 13.01.2012, 10:10
Re: if(IsPlayerInVehicle(playerid, ID)) - by JamesC - 13.01.2012, 10:46
Re: if(IsPlayerInVehicle(playerid, ID)) - by cruising - 13.01.2012, 10:58
Re: if(IsPlayerInVehicle(playerid, ID)) - by JamesC - 13.01.2012, 11:01
Re: if(IsPlayerInVehicle(playerid, ID)) - by cruising - 13.01.2012, 11:18

Forum Jump:


Users browsing this thread: 1 Guest(s)