Problem with if(GetVehicleModel(vehicleid) == 596||597||598||427||523||599||601)
#6

Try this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/work", cmdtext, true, 10) == 0)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 519 || GetVehicleModel(vehicleid) == 592 || GetVehicleModel(vehicleid) == 520)
        {
           PilotJob[playerid] = 1;
           SetPlayerCheckpoint(playerid, -1301.9893,-347.4291,14.1484,3.50);
           SendClientMessage(playerid, -1,"{CE0000}You started a mission,Go to SF Airport Gate 2 to start the flight!");
           return 1;
        }
        else SendClientMessage(playerid, -1,"You have to be on a plane to start the flight!");
    }
    return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 519 || GetVehicleModel(vehicleid) == 592 || GetVehicleModel(vehicleid) == 520)
    {
        SendClientMessage(playerid, -1, "Job: You can start the flight by using {00FF00}/work");
    }
    else SendClientMessage(playerid,-1,"Sorry You can't start mission if you don't type /work");
    return 0;
}
I'm fairly certain you cannot just put the numbers between the or statements. You must do the same thing you did for the first one.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)