Tando Posted January 31, 2019 Share Posted January 31, 2019 addEvent("onPlayerHeadshot") addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 and weapon == 34 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then setElementHealth ( source, getElementHealth(source) - 100 ) if isPlayerDead ( source ) == true then killPed(source, attacker, weapon, bodypart) setPedHeadless( source, true ) setTimer( BackUp, 900, 1, source ) end end end end ) function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, false ) end end it's working fine but need to add img on it like when player kill someone headshot give img in killmessages Link to comment
AncienT Posted February 1, 2019 Share Posted February 1, 2019 6 hours ago, (SAUG)Tando said: addEvent("onPlayerHeadshot") addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 and weapon == 34 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then setElementHealth ( source, getElementHealth(source) - 100 ) if isPlayerDead ( source ) == true then killPed(source, attacker, weapon, bodypart) setPedHeadless( source, true ) setTimer( BackUp, 900, 1, source ) end end end end ) function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, false ) end end it's working fine but need to add img on it like when player kill someone headshot give img in killmessages Same as the image? Link to comment
Tando Posted February 1, 2019 Author Share Posted February 1, 2019 11 hours ago, AncienT said: Same as the image? yea same 100/100 xd Link to comment
AncienT Posted February 1, 2019 Share Posted February 1, 2019 2 hours ago, (SAUG)Tando said: yea same 100/100 xd https://community.multitheftauto.com/index.php?p=resources&s=details&id=1600&expanddescr=1 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