ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getWeaponFlags

Function

getWeaponFlags

ServerWeaponsIdentical to MTA:SA

Returns a scripted weapon's flags: the whole table, or one flag when you pass its name.

Syntax

mixed getWeaponFlags(weapon weapon [, string flag = nil])

Arguments

weaponweapon
The scripted weapon.
flagstring, optional = nil
Flag name.

Returns

The flag table, one flag's value, or false.

Example

if getWeaponFlags(turret, "shoot_if_out_of_range") then
    print("Strzela także poza zasięgiem")
end

See also