-.Paradox.- Posted April 14, 2014 Share Posted April 14, 2014 Hello, can somebody see what's wrong here? It suppose to set the victim headless and die, but it wont work, no errors in debug script when i hit a ped or a player, thanks. addEventHandler("onPlayerDamage",root, function(killer, weapon, bodypart) if (killer and getElementType(killer) == "player" and killer ~= source) then if weapon == 8 then setPedHeadless(killer, true) killPed(source,killer,weapon) end end end) Link to comment
Moderators IIYAMA Posted April 14, 2014 Moderators Share Posted April 14, 2014 setPedHeadless(killer, true) setPedHeadless(source, true) For the rest debug the code manually, because it has to work. Link to comment
cheez3d Posted April 14, 2014 Share Posted April 14, 2014 addEventHandler("onPlayerDamage",root,function(attacker,weapon,part) if attacker and getElementType(attacker) == "player" and attacker ~= source then if weapon == 8 and part == 9 then setPedHeadless(source,true) killPed(source,attacker,weapon,part) end end end) Link to comment
-.Paradox.- Posted April 14, 2014 Author Share Posted April 14, 2014 Thanks it's working but i have to aim in the head, Is it possible to make it without aiming? I mean once i hit him with katana he die.. Link to comment
Alexs Posted April 14, 2014 Share Posted April 14, 2014 Thanks it's working but i have to aim in the head, Is it possible to make it without aiming? I mean once i hit him with katana he die.. addEventHandler("onPlayerDamage",root,function(attacker,weapon,part) if attacker and getElementType(attacker) == "player" and attacker ~= source then if weapon == 8 then setPedHeadless(source,true) killPed(source,attacker,weapon,part) end end end) 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