-- server
addEventHandler("onPlayerDamage",root,
function(attacker, weapon, bodypart)
if attacker and attacker ~= source and getElementType(attacker) == "player" and getElementData(attacker,"SPunch") then
if weapon == 0 then
killPed(source, attacker, weapon, bodypart)
end
end
end
)
-- Client
addEventHandler("onClientGUIClick",root, function ()
if source == button1 then
local Data = getElementData(localPlayer,"SPunch")
if Data and Data == true then
setElementData(localPlayer,"SPunch",false)
outputChatBox("تم اغلاق خاصية الضربه القاتله")
else
setElementData(localPlayer,"SPunch",true)
outputChatBox("تم فتح خاصية الضربه القاتله")
end
end
end)