Jump to content

setWeaponProperty


Raversing

Recommended Posts

Hi,

I have a question about setWeaponProperty, when I use setWeaponProperty will it apply the stats modifications on all elements or just to a specific element ?

For example :

function setRifleStats(thePlayer) 
            setWeaponProperty(33, "pro", "flags", 0x000010) -- Country Rifle 
            setWeaponProperty(33, "pro", "flags", 0x000020) -- Country Rifle 
            setWeaponProperty(33, "pro", "damage", 220) -- Country Rifle 
end 
addCommandHandler( "upgraderifle", setRifleStats ) 

This script will change the stats for the player who entered the command or to all elements ?

Thanks.

Link to comment

Ok, thanks for reply, maybe the function could be changed by MTA Devs ?

From this : bool setWeaponProperty ( int weaponID/string weaponName, string weaponSkill, string property, int/float theValue )

To this : bool setWeaponProperty ( element theElement, int weaponID/string weaponName, string weaponSkill, string property, int/float theValue )

And also for getWeaponProperty.

But I don't know if its possible.

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