Jump to content

Disallowed weapos


Miika

Recommended Posts

I use onClientWeaponFire but it doesn't work. I can kill people with minigun

function noDeagle() 
    local weaponID = getElementModel(source)  
    if weaponID == 38 then  
        cancelEvent()  
    end 
end 
addEventHandler("onClientWeaponFire", getRootElement(), noDeagle) 

Link to comment
I use onClientWeaponFire but it doesn't work. I can kill people with minigun

This event is only for weapons created with createWeapon. The example provided on the onClientPlayerDamage page should work for you, tho :)

------------------------------------------------------------------------------------------------------------------------------------------------

If you want to go abit more advanced: you can also decrease the minigun damage with setWeaponProperty, instead of completely deactivating it:

setWeaponProperty(38,"pro","damage",1.5) 

Just paste this into a server-side script and it should work ;)

The last number is the amount of damage per bullet, a player has 100 Health.

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