Hallo, Habe problem mit dem Rifle-Headshot mod, es soll ab rang 4 funktionieren..
Lua
addEvent "onPlayerHeadshot"
addEventHandler("onPlayerDamage", getRootElement(),
if vioGetElementData ( player, "rang" ) >= 4 then
function (weapon, bodypart, playerrang)
if weapon == 33 then
local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon)
if result == true then
if isEvil( player ) then
if bodypart == 9 then
killPed(source, attacker, weapon, bodypart)
end
end
end
end
end
end
end
)^^
Alles anzeigen