public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == 448) { if(PlayerInfo[playerid][pJob] == 1) { SendClientMessage(playerid, COLOR_YELLOW, "--------PIZZA DELIVERY--------"); SendClientMessage(playerid, COLOR_ORANGE, "Your job is to deliver these pizzas"); SendClientMessage(playerid, COLOR_ORANGE, "Your current destination is marked."); SendClientMessage(playerid, COLOR_YELLOW, "--------PIZZA DELIVERY--------"); new rand = random(sizeof(PizzaPoint)); SetPlayerCheckpoint(playerid, PizzaPoint[rand][0],PizzaPoint[rand][1],PizzaPoint[rand][2] , 3.0); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "You do not work for pizza delivery!"); } } return 1; }
OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
I wouldn't hard-code your mission to a vehicleid like that - if you ever want to add or remove any vehicles it makes maintenance almost impossible. Either save the vehicleid in a variable or use the modelid instead.
|
GetVehicleModel(vehicleid) == 448
Try this.
Код:
GetVehicleModel(GetVehicleID(vehicleid) == 448) |
GetVehicleModel(vehicleid) == 448