Jump to content

Silenced gun


Hero192

Recommended Posts

Is something like that correct?

function silencedDamageSystem(attacker, weapon, _, loss) 
    if attacker and getElementType(attacker) == "player" and weapon == 23 then 
      cancelEvent() 
     local damage = getElementHealth(localPlayer)+loss-5 
     if damage > 0 then 
     setElementHealth(localPlayer, damage) 
     end 
   end 
end  
addEventHandler("onClientPlayerDamage", localPlayer,silencedDamageSystem) 

Link to comment
setWeaponProperty will change the properties for all the players in the server, which means that if you change the silenced pistol damage, it'll be for everyone.

That's exactly what I want, Can I know which property I've to use in this situation to edit the silenced pistol's 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...