SkrillexX Posted May 31, 2013 Share Posted May 31, 2013 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
Castillo Posted May 31, 2013 Share Posted May 31, 2013 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
SkrillexX Posted May 31, 2013 Author Share Posted May 31, 2013 So the damage will be reduced by 10% of the total health ? Link to comment
SkrillexX Posted May 31, 2013 Author Share Posted May 31, 2013 i cannot understand "poor" and "std" and "pro" .. i didn't understood the wiki's explication. Can you help me? Link to comment
Castillo Posted May 31, 2013 Share Posted May 31, 2013 Is the skill required in order to make use of that change you set. Link to comment
SkrillexX Posted May 31, 2013 Author Share Posted May 31, 2013 When i tested your Code. Sawn-off kills with only 1 shot. What is the error Link to comment
SkrillexX Posted May 31, 2013 Author Share Posted May 31, 2013 i fixed it. "10" MEans 10shots. it is separated on shots numbers Link to comment
K4stic Posted May 31, 2013 Share Posted May 31, 2013 the number after "Damage" separated on lose health of player who attacked by weaponID 26 Link to comment
Moderators IIYAMA Posted May 31, 2013 Moderators Share Posted May 31, 2013 shotguns do have a spray, every spark counts as a bullet. 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