Jonas^ Posted June 9, 2018 Share Posted June 9, 2018 (edited) bad argument @ 'getelementtype' [ expected element at argument 1, got nill ] Linha 2 < - function MakePlayerHeadshot( attacker, weapon, bodypart, loss ) if getElementType ( attacker ) == "ped" then if bodypart == 9 then triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) setPedHeadless ( source, true ) killPed( source, attacker, weapon, bodypart ) setTimer( BackUp, 900, 1, source ) end end end Edited June 9, 2018 by OverKILL Link to comment
DNL291 Posted June 9, 2018 Share Posted June 9, 2018 Verifique se existe o atacker: if attacker and getElementType ( attacker ) == "ped" then 1 Link to comment
Jonas^ Posted June 9, 2018 Author Share Posted June 9, 2018 4 minutes ago, DNL291 said: Verifique se existe o atacker: if attacker and getElementType ( attacker ) == "ped" then OBG Link to comment
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