getWeaponFlags
Client-side
Server-side
Shared
Pair: setWeaponFlags
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
This function gets the flags of a custom weapon.
Syntax
getWeaponFlags ( )Code Examples
client
This example checks whether the instant_reload flag is enabled or disabled.
local weapon = createWeapon("silenced", 0, 0, 10) -- Create the weaponif weapon then -- if the weapon exist then setWeaponFlags(weapon, "instant_reload", true) -- enable instant_reload local flag = (getWeaponFlags (weapon,"instant_reload") and "instant_reload enabled") or "instant_reload disabled" outputChatBox (flag)end