Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: czołg
1. Czołg podatny na wybuchy
Witam pr?buje napisa? skrypt kt?ry sprawi ?e jeden czo?g b?dzie m?g? zniszczy drugi czo?g , napisa?em co? takiego ale nic nie dzia?a , prosz? o pomoc .
Kod:



local weaponsToDamageRhino = {
[51] = "Explosion",
}

function handleRhinoDamage(attacker, weapon, loss, x, y, z, tire)
if (getElementModel(source) == 432 and loss > 0) then
if (weaponsToDamageRhino[weapon]) then
setElementHealth(source, getElementHealth(source) - loss)
end
end
end
addEventHandler("onClientVehicleDamage", root, handleRhinoDamage)