Lua · Variables · Features
weapon
Stats of the weapon in someone's hands, read from the game files.
| Function | What it does |
|---|---|
weapon.info([slot]) | Your weapon, or the one held by that player. |
#weapon.info
weapon.info([slot])Your weapon, or the one held by that player.
Returns
table | nil
name, damage, headshot_multiplier, armor_ratio, penetration, range, range_modifier, cycle_time, max_speed, spread, inaccuracy_stand, inaccuracy_move, recoil, bullets, price, kill_award, reserve_max, zoom_levels, full_auto, max_clip, clip, reserve, reloading, inaccuracy. Missing fields are left out.Example
local w = weapon.info()
if w then draw.text(20, 200, w.name .. " " .. w.clip .. "/" .. w.max_clip, color(255,255,255)) end