Então o "bug" e que quando um carro explode perto do jogador, o player não recebe dano, no debugscript 3 fala que o erro e na linha 1116 do codigo que irei colocar abaixo.
addEventHandler("onClientPlayerDamage",getLocalPlayer(),function(attacker,weapon,bodypart,loss)
if not getElementData(getLocalPlayer(),"vestLife") or not getElementData(getLocalPlayer(),"helmetLife") then
setElementData(getLocalPlayer(),"vestLife",50)
setElementData(getLocalPlayer(),"helmetLife",100)
end
if weapon and weapon > 1 and attacker and getElementType(attacker)== "player" then
damage = getWeaponDamage(weapon,attacker) / 100
if bodypart == 9 then
if getActiveHelmetVar(getLocalPlayer()) then
helmetLife = getElementData(getLocalPlayer(),"helmetLife")
setElementData(getLocalPlayer(),"helmetLife", helmetLife -damage)
if getElementData(getLocalPlayer(),getActiveHelmet(getLocalPlayer())) >= 1 then
setElementData(getLocalPlayer(),getActiveHelmet(getLocalPlayer()),getElementData(getLocalPlayer(),getActiveHelmet(getLocalPlayer())) - 1)
end
if getElementData(getLocalPlayer(),"helmetLife") <= 0 then
setElementData(getLocalPlayer(),"helmetLife",100)
setElementData(getLocalPlayer(),getActiveHelmetVar(getLocalPlayer()),false)
end
end
end
end
end)
addEventHandler("onClientPlayerDamage",getLocalPlayer(),function(attacker,weapon,bodypart,loss)
if not getElementData(getLocalPlayer(),"vestLife") or not getElementData(getLocalPlayer(),"vestLife") then
setElementData(getLocalPlayer(),"vestLife",50)
setElementData(getLocalPlayer(),"vestLife",100)
end
if weapon and weapon > 1 and attacker and getElementType(attacker)== "player" then
damage = getWeaponDamage(weapon,attacker) / 100
if bodypart == 3 then
if getActiveHelmetVar(getLocalPlayer()) then
vestLife = getElementData(getLocalPlayer(),"vestLife")
setElementData(getLocalPlayer(),"vestLife", vestLife -damage)
if getElementData(getLocalPlayer(),getActiveHelmet(getLocalPlayer())) >= 1 then
setElementData(getLocalPlayer(),getActiveHelmet(getLocalPlayer()),getElementData(getLocalPlayer(),getActiveHelmet(getLocalPlayer())) - 1)
end
if getElementData(getLocalPlayer(),"vestLife") <= 0 then
setElementData(getLocalPlayer(),"vestLife",100)
setElementData(getLocalPlayer(),getActiveHelmetVar(getLocalPlayer()),false)
end
end
end
end
end)