If vehicle is a heli or plane
#1

How can i see if it is a fly vehicle?

Quote:

if(cLicense[playerid] == 0) {
SendClientMessage(playerid, COLOR_LIGHTRED, "[P-RP]: You don't have a driving license yet, drive carefully or the cops will notice.");
}
if(cLicense[playerid] == 1) {
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[P-RP]: You have a driving license yet, drive carefully.");
}

I have this under OnPlayerEnterVehicle but it displays in plane and helicopters too.
How can i change that?
Reply
#2

pawn Код:
if(cLicense[playerid] == 0 && IsPlayerInCar(playerid) ){
SendClientMessage(playerid, COLOR_LIGHTRED, "[P-RP]: You don't have a driving license yet, drive carefully or the cops will notice.");
}
if(cLicense[playerid] == 1 && IsPlayerInCar(playerid)) {
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[P-RP]: You have a driving license yet, drive carefully.");
}
and bottom of script
pawn Код:
stock IsPlayerInCar(playerid) {
    switch(GetVehicleModel(GetPlayerVehicleID(playerid))){
        case    400,401,402,404,405,410,411,412,415,418,419,420,421,422,424,426,429,434,436,
                438,439,442,445,451,458,466,467,470,474,475,477,478,480,489,490,
                491,492,494,496,500,501,502,503,504,505,506,507,516,517,518,526,527,529,533,
                534,535,536,540,541,542,543,545,546,547,549,550,551,555,558,559,560,561,562,
                565,566,567,575,576,580,585,587,589,596,597,598,600,602,603,604,605:return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)