i already gave it to you
addEventHandler ( "onClientPlayerDamage", localPlayer,
function( attacker, weapon, bodypart )
local playerTeam = getPlayerTeam(source)
if playerTeam and
if ( weapon == 37 ) and ( getTeamName(playerTeam) == "tactics" ) then
cancelEvent()
end
end
end
)
untested
you must read this about death reason : Here
When a player was shot by a weapon, the respective weapon ID is the death reason ID
thanks you soo much, There was one Error anyway i've fixed it
and one more question
I want players to die in 1 second with every weapon expect explostion
addEventHandler("onPlayerDamage", getRootElement() ,
function (attacker, weapon, bodypart, loss)
killPed(source,attacker,weapon)
if weapon == 51 then
cancelEvent()
end
end
)
not working and no error
wanted to cancle the event from id 51, they die in 1 second even with explstion.