24.07.2009, 23:30
Try this
If not this
Код:
public Startup(playerid, vehicleid) { new pveh = GetVehicleModel(GetPlayerVehicleID(playerid)); new newcar = GetPlayerVehicleID(playerid); if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER || engineOn[vehicleid]) { //I do nothing! } else if(IsPlayerInAnyVehicle(playerid) && !engineOn[vehicleid] && !vehicleEntered[playerid][vehicleid] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && pveh != 510 && pveh != 462 && newcar != 59 && newcar != 60 && !IsAPlane(newcar) && !IsAHarvest(newcar) && !IsADrugHarvest(newcar) && !IsASweeper(newcar)); { SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Type /engine or press SHIFT to start your vehicle!"); TogglePlayerControllable(playerid, false); vehicleEntered[playerid][vehicleid] = true; } else if(IsPlayerInAnyVehicle(playerid) && !engineOn[vehicleid] && vehicleEntered[playerid][vehicleid] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && pveh != 510 && pveh != 462 && newcar != 59 && newcar != 60 && !IsAPlane(newcar) && !IsAHarvest(newcar) && !IsADrugHarvest(newcar) && !IsASweeper(newcar)); { SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Type /engine or press SHIFT to start your vehicle!"); TogglePlayerControllable(playerid, false); } }
Код:
public Startup(playerid, vehicleid) { new pveh = GetVehicleModel(GetPlayerVehicleID(playerid)); new newcar = GetPlayerVehicleID(playerid); if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER || engineOn[vehicleid]) { //I do nothing! } else if(IsPlayerInAnyVehicle(playerid) && !engineOn[vehicleid] && !vehicleEntered[playerid][vehicleid] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && pveh != 510 && pveh != 462 && newcar != 59 && newcar != 60 && !IsAPlane(newcar) && !IsAHarvest(newcar) && !IsADrugHarvest(newcar) && !IsASweeper(newcar)); { SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Type /engine or press SHIFT to start your vehicle!"); TogglePlayerControllable(playerid, false); vehicleEntered[playerid][vehicleid] = true; } else if(IsPlayerInAnyVehicle(playerid) && !engineOn[vehicleid] && vehicleEntered[playerid][vehicleid] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && pveh != 510 && pveh != 462 && newcar != 59 && newcar != 60 && !IsAPlane(newcar) && !IsAHarvest(newcar) && !IsADrugHarvest(newcar) && !IsASweeper(newcar); { SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Type /engine or press SHIFT to start your vehicle!"); TogglePlayerControllable(playerid, false); } }