Begging for help (Important)
#5

anyway, i think your code doesn't work.. because you need to get vehicle model(GetVehicleModel(vehicleid)) not the vehicle id..
pawn Код:
if(gClass[playerid] == CLASS_PILOT)
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
    {
    new veh, Float:x,Float:y,Float:z;
    veh = GetPlayerVehicleID(playerid);
    if(veh > 425 || 447 || 464 || 476 || 520)
    GetPlayerPos(playerid, x,y,z);
    SetPlayerPos(playerid, x,y,z+1);
    }else return SendClientMessage(playerid, red, "[ERROR]: You need to be a pilot to fly this vehicle");
    return 1;
    }
}



if your code is bugged then try This..
FIXED
pawn Код:
if(gClass[playerid] != CLASS_PILOT)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
    {
        new veh,model, Float:x,Float:y,Float:z;
        veh = GetPlayerVehicleID(playerid);
        model = GetVehicleModel(veh );
        if(model == 425 || model == 447 ||model ==  464 || model ==  476 || model == 520)
        {
        GetPlayerPos(playerid, x,y,z);
        SetPlayerPos(playerid, x,y,z+1);
        return SendClientMessage(playerid, red, "[ERROR]: You need to be a pilot to fly this vehicle");
        }
    }
}
Reply


Messages In This Thread
Begging for help (Important) - by Strier - 29.01.2013, 04:53
Re: Begging for help (Important) - by Bakr - 29.01.2013, 05:12
Re: Begging for help (Important) - by Babul - 29.01.2013, 05:16
Respuesta: Begging for help (Important) - by Strier - 29.01.2013, 05:21
Re: Respuesta: Begging for help (Important) - by Jewell - 29.01.2013, 05:38
Re: Begging for help (Important) - by Dark Killer - 29.01.2013, 08:48

Forum Jump:


Users browsing this thread: 2 Guest(s)