VEHICLEDAMAGE_UPDATEINTERVAL [int (default 50)] (Interval of internal timer) VEHICLEDAMAGE_USE_TIMER [0/1(default)] (Uses the internal timer to calculate vehicle health changes, if active, otherwise VehicleDamageUpdater() has to be called manually) VEHICLEDAMAGE_FLIPVEH_IFNODMG [0(default)/1] (Flips the vehicle if &apply_health_damage = 0 && this is active && vehicle is upside down)
OnVehicleTakeDamage(vehicleid, driverid, &Float:amount, playerid, weaponid, &apply_health_damage); OnVehicleTakeVisualDamage(vehicleid, driverid, &apply_visual_damage);
public OnVehicleTakeDamage(vehicleid, driverid, &Float:amount, playerid, weaponid, &apply_health_damage) { if(IsPlayerAdmin(driverid)) { apply_health_damage = 0; if(playerid != INVALID_PLAYER_ID) { SendClientMessage(playerid, -1, "Don't touch my fancy ass car!"); SetPlayerHealth(playerid, -1); } } return 1; }
This doesn't prevent damage, it just provides some easy ways to revert the damage or customize the amount of damage to be dealt. |
So if you set the amount to 0 it will prevent the damage
Nice job tho |
apply_health_damageĀ