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

Function

setWeaponProperty

ServerWeaponsIdentical to MTA:SA

Sets a weapon property (damage, range, accuracy and so on) for the whole server.

Syntax

With skill

bool setWeaponProperty(string/int weapon, string skill, string property, mixed value)

Without skill

bool setWeaponProperty(string/int weapon, string property, mixed value)

Arguments

weaponOrIdstring/int
Weapon name or ID.
skillOrPropertystring
Skill level ("poor", "std", "pro") or the property name.
propertyOrValuemixed
The property name or the value.
valuemixed, optional = nil
The value when a skill level was given.

Returns

true on success.

Example

setWeaponProperty("deagle", "pro", "damage", 60)
setWeaponProperty(31, "pro", "weapon_range", 120)

See also