diff --git a/[gameplay]/headshot/headshot.lua b/[gameplay]/headshot/headshot.lua deleted file mode 100644 index 7f02c21de..000000000 --- a/[gameplay]/headshot/headshot.lua +++ /dev/null @@ -1,25 +0,0 @@ -local removeHeadOnHeadshot = get("removeHeadOnHeadshot") - -addEvent("onPlayerHeadshot", false) - -local function checkForHeadshot(attacker, weapon, bodypart, loss) - if bodypart == 9 then - local forceDeath = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) - - if forceDeath then - killPed(source, attacker, weapon, bodypart) - - if removeHeadOnHeadshot then - setPedHeadless(source, true) - end - end - end -end -addEventHandler("onPlayerDamage", root, checkForHeadshot) - -local function restorePlayerHead() - if removeHeadOnHeadshot and isPedHeadless(source) then - setPedHeadless(source, false) -- Restore head if it got blown off - end -end -addEventHandler("onPlayerSpawn", root, restorePlayerHead) \ No newline at end of file diff --git a/[gameplay]/headshot/meta.xml b/[gameplay]/headshot/meta.xml index 28e79cc7d..c7b5cfb82 100644 --- a/[gameplay]/headshot/meta.xml +++ b/[gameplay]/headshot/meta.xml @@ -1,11 +1,12 @@ - -