20.02.2013, 12:44
I want to make a pizza delivery job, but my problem is that nothing happens when I get in the car.
Here's the code:
Here's the code:
Код:
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;
}


