How to enable car getting damage without a driver?
#2

pawn Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(hittype == BULLET_HIT_TYPE_VEHICLE)
    {
        new Float:vHealth;
        GetVehicleHealth(hitid, vHealth);
        SetVehicleHealth(hitid, vHealth-50); //Each shot to the vehicle will deal 50 damage, you can change this yourself based on the weapon used etc.
    }
    return 1:
}
Reply


Messages In This Thread
How to enable car getting damage without a driver? - by Salvator - 01.03.2016, 19:50
Re: How to enable car getting damage without a driver? - by [NWA]Hannes - 01.03.2016, 20:02
Re: How to enable car getting damage without a driver? - by CodeStyle175 - 01.03.2016, 20:02
Re: How to enable car getting damage without a driver? - by Salvator - 01.03.2016, 21:55
Re: How to enable car getting damage without a driver? - by Chilli9434 - 01.03.2016, 21:57
Re: How to enable car getting damage without a driver? - by Salvator - 01.03.2016, 22:03

Forum Jump:


Users browsing this thread: 1 Guest(s)