Jump to content

How to remove weapon damage


AlfaMTA

Recommended Posts

I'm trying to do a tazer system with silenced pistol

then, I put it in serverside:

function removeDamage () 
    setWeaponProperty (23, "poor", "damage", 0) 
end 
addEventHandler ( "onResourceStart", resourceRoot, removeDamage ) 

But it doesn't work

can anyone help me?? :roll:

Thanks for all! :P

Link to comment
clientside
  
addEventHandler ( "onClientPlayerDamage",localPlayer, 
function ( attacker, weapon, bodypart) 
    if weapon == 23 then 
        cancelEvent() 
    end 
end) 
  

Unfortunaly, it doesn't work for me!

Because it's client-side.

Link to comment

By default, if undeclared in meta.xml, the script will become server-sided. So, you need to change it in meta.xml (add in type="client" />).

Sometimes, you have to make things client side... It's just how it works.

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