FastDriver Posted September 3, 2013 Posted September 3, 2013 HEllo guys i got an problem with an headshot script could anyone help me and watch what is wrong? addEvent "onPlayerHeadshot" addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if not attacker then return end if getElementType(attacker) ~= "player" then return end if getPlayerTeam(attacker) then if getTeamName(getPlayerTeam(attacker)) == "Anonymous" then if getElementType(source) == "player" then if bodypart == 9 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then killPed(source, attacker, weapon, bodypart) end end end )
Moderators IIYAMA Posted September 3, 2013 Moderators Posted September 3, 2013 why triggerEvent ? why are you missing 2 end's?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now