Problem with getting jacked
#6

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(IsDeliveryVeh(vehicleid))
    {
        new Float:Health;
        GetVehicleHealth(GetPlayerVehicleID(playerid), Health);
        for(new i = 0; i < 12; i++) TogglePlayerDynamicCP(playerid, DeliveryJobCP[i],0);
        DisablePlayerCheckpoint(playerid);
        if(Health < 250)
        {
            PlayerInfo[playerid][pDeliveryVeh] = -1;
            DeliverWHpay[playerid] = 0;
            DeliverCounter[playerid] = 0;
            StartingDeliveryJob[playerid] = 0;
            LastDeliveryCP[playerid] = 0;
            DeliveryMission[playerid] = 0;
            return SendClientMessage(playerid, COLOR_ORANGE, "Your vehicle is badly damaged. You lost your wage!");
        }
        else return SendClientMessage(playerid, COLOR_ORANGE, "Don't lose your vehicle or you will lose your wage!");
    }
}
Shortened the code a little

EDIT:

From the wiki
Quote:

Not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos. You must use OnPlayerStateChange and check if their old state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER.

Reply


Messages In This Thread
Problem with getting jacked - by oblexive - 27.07.2012, 10:03
Re: Problem with getting jacked - by Alexis1999 - 27.07.2012, 10:09
Re: Problem with getting jacked - by oblexive - 27.07.2012, 10:13
Re: Problem with getting jacked - by Alexis1999 - 27.07.2012, 10:24
Re: Problem with getting jacked - by oblexive - 27.07.2012, 10:27
Re: Problem with getting jacked - by Misiur - 27.07.2012, 10:28
Re: Problem with getting jacked - by oblexive - 27.07.2012, 10:29
AW: Problem with getting jacked - by dalkgamler - 27.07.2012, 10:33
Re: Problem with getting jacked - by Misiur - 27.07.2012, 10:36
Re: Problem with getting jacked - by oblexive - 27.07.2012, 10:50

Forum Jump:


Users browsing this thread: 1 Guest(s)