You wanted once the player exits from the delivery vehicle the checkpoints to disappear right?
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(IsDeliveryVeh(vehicleid))
{
new Float:Health;
GetVehicleHealth(GetPlayerVehicleID(playerid), Health);
if(Health < 250)
{
TogglePlayerDynamicCP(playerid, DeliveryJobCP[0],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[1],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[2],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[3],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[4],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[5],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[6],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[7],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[8],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[9],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[10],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[11],0);
PlayerInfo[playerid][pDeliveryVeh] = -1;
DeliverWHpay[playerid] = 0;
DeliverCounter[playerid] = 0;
StartingDeliveryJob[playerid] = 0;
LastDeliveryCP[playerid] = 0;
DeliveryMission[playerid] = 0;
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_ORANGE, "Your vehicle is badly damaged. You lost your wage!");
}
else
{
TogglePlayerDynamicCP(playerid, DeliveryJobCP[0],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[1],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[2],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[3],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[4],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[5],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[6],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[7],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[8],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[9],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[10],0);
TogglePlayerDynamicCP(playerid, DeliveryJobCP[11],0);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_ORANGE, "Don't lose your vehicle or you will lose your wage!");
}
}
}