- Documentation
- Server functions
- getWeaponProperty
Function
getWeaponProperty
Returns a weapon property (e.g. damage, range) set on this server with setWeaponProperty.
Syntax
mixed getWeaponProperty(string/int weaponOrId, string skillOrProperty [, string property = nil])Arguments
weaponOrIdstring/int- Weapon name or ID.
skillOrPropertystring- Skill level (
"poor","std","pro") or the property name directly. propertystring, optional = nil- Property name when the second argument was a skill level.
Returns
The property value, or false if not set.
Example
local dmg = getWeaponProperty("m4", "pro", "damage")
print(dmg or "domyślne")