Don't break your wheels and. ..
#5

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && isNearSpikestrip(playerid, 2.5))
    {
        if(!tireDamage(GetPlayerVehicleID(playerid))
        {
            UpdateVehicleDamage(GetPlayerVehicleID(playerid), encode_tires(1, 1, 1, 1);
        }
    }
   
    return 1;
}

UpdateVehicleDamage(vehicleid, tires)
{
    new panels, doors, lights, tires_old;
    GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires_old);
    UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
   
    return 1;
}
This is an example, though I don't really recommend using OnPlayerUpdate.
Reply


Messages In This Thread
Don't break your wheels and. .. - by Jimmi - 25.08.2015, 16:28
Re: Don't break your wheels and. .. - by Jimmi - 25.08.2015, 18:20
Re: Don't break your wheels and. .. - by MarvinPWN - 25.08.2015, 18:58
Re: Don't break your wheels and. .. - by Jimmi - 25.08.2015, 18:59
Re: Don't break your wheels and. .. - by Abagail - 25.08.2015, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)