Jump to content

[HELP] Weapon Damage


Recommended Posts

Greeting Pros,

Today i waned to make a script that reduces the Sawn-off Damage. I Searched for the related function which i think it was setWeaponProperty . Here's my code , i made everything on the server side.

Serverside-

function reduceP () 
weapon = getWeaponProperty(26, "pro", "damage") 
 if ( weapon ) then 
 setWeaponProperty (26, "poor", "damage" ) 
 end 
end 

I'd be grateful if any of you help me since i am a new Lua worker.

Link to comment

Well, your problem is that you are never executing that function, plus, you forgot to set to how much you want to set the damage to.

function reduceP ( ) 
    setWeaponProperty ( 26, "poor", "damage", 10 ) 
end 
addEventHandler ( "onResourceStart", resourceRoot, reduceP ) 

10 = damage.

Link to comment

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...