function DamageBMX(attacker, weapon, loss, x, y, z, tyre)
if (getElementModel(source) == 432) then
cancelEvent()
end
if (getElementModel(source) == 432) then
local health = getElementHealth(source)
local losehealth = setElementHealth(source,health-90)
if(health == 10) then
x,y,z = getElementPosition(source)
createExplosion(x,y,z,4,true,_,true)
end
end
end
addEventHandler("onClientVehicleDamage", root, DamageBMX)
The code of Hornet works good , but you can try anyway the code which i've created for my own server , it works without doubts.