5150 Posted August 25, 2015 Posted August 25, 2015 ok so can someone help me? i want the katana to be a one-hit-kill (its a lightsaber mod) so when you hit someone, its an instant kill. i know the script must go in client.lua under "weapon window" in "freeroam" but idk how to make the script or edit the meta to include this. i looked at the wiki and it didnt help much. please someones help?
5150 Posted August 25, 2015 Author Posted August 25, 2015 that... that doesnt really help me. i hate the wiki i never understand it
JR10 Posted August 25, 2015 Posted August 25, 2015 What is it that you don't understand? The wiki shows you the list of arguments that are passed to the even'ts handling function. One of those arguments is the weapon's id. With that you can check when the player is damaged for the weapon's id, if it's the Katana, then immediately kill the player. addEventHandler('onClientPlayerDamage', localPlayer, function(attacker, weapon) if (weapon == 8 ) then setElementHealth(localPlayer, 0) end end)
5150 Posted August 25, 2015 Author Posted August 25, 2015 What is it that you don't understand? The wiki shows you the list of arguments that are passed to the even'ts handling function. One of those arguments is the weapon's id.With that you can check when the player is damaged for the weapon's id, if it's the Katana, then immediately kill the player. addEventHandler('onClientPlayerDamage', localPlayer, function(attacker, weapon) if (weapon == 8 ) then setElementHealth(localPlayer, 0) end end) thanks bro, and just to be sure, you put this where i specified in the main post? and btw i think i downloaded your business system some time ago. still have it
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