Jump to content

set weapon property


5150

Recommended Posts

Posted

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?

Paid Roleplay Mapper/Server Management - Message on forums or Discord for info

Fluent with Owlgaming Code. Discord message for paid full set-ups and help

My Discord: 5150#5150 (or .5150)

 

Monky Gaming Roleplay/Adventure Discord 
(English players and servers interested in collaborating or partnering message me)

https://discord.gg/SFBUHknpxy

Posted

that... that doesnt really help me. i hate the wiki i never understand it

Paid Roleplay Mapper/Server Management - Message on forums or Discord for info

Fluent with Owlgaming Code. Discord message for paid full set-ups and help

My Discord: 5150#5150 (or .5150)

 

Monky Gaming Roleplay/Adventure Discord 
(English players and servers interested in collaborating or partnering message me)

https://discord.gg/SFBUHknpxy

Posted

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) 

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted
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 ;)

Paid Roleplay Mapper/Server Management - Message on forums or Discord for info

Fluent with Owlgaming Code. Discord message for paid full set-ups and help

My Discord: 5150#5150 (or .5150)

 

Monky Gaming Roleplay/Adventure Discord 
(English players and servers interested in collaborating or partnering message me)

https://discord.gg/SFBUHknpxy

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...