Jump to content

[HELP] Weapon Damage


Recommended Posts

Posted

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.

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I think so.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Is the skill required in order to make use of that change you set.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

the number after "Damage" separated on lose health of player who attacked by weaponID 26

Giving a Fuck? Nope, That isn't in My Skill Set

castie11.png

  • Moderators
Posted

shotguns do have a spray, every spark counts as a bullet.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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