Counter Strike Online Wiki
Advertisement

Weapon object


Tables[]

Game.Weapon.position[]

Data type representing specific block coordinates
Fields:
  • x: (int) x coordinate
  • y: (int) y coordinate
  • z: (int) z coordinate


Fields[]

Game.Weapon.user[]

A table that can store arbitrary data.


Game.Weapon.weaponid[]

Gets the type of weapon.


Game.Weapon.color[]

Gets or sets the color of the weapon. The set color is applied to the effect color when the weapon is dropped and the color of the weapon inventory.


Game.Weapon.damage[]

Gets or sets the scale of weapon damage. You can set a value between 0 and 100.
  • damage: (number)


Game.Weapon.speed[]

Gets or sets the magnification of weapon movement speed. You can set a value between 0 and 100.
  • speed: (number)


Game.Weapon.knockback[]

Gets or sets the scale of the weapon knockback. You can set a value between 0 and 100.
  • knockback: (number)


Game.Weapon.flinch[]

Gets or sets the scale of weapon stiffness. You can set a value between 0 and 100.
  • flinch: (number)


Game.Weapon.criticalrate[]

Gets or sets the critical rate of the weapon. You can set a value between 0 and 100.
  • criticalrate: (number)


Game.Weapon.criticaldamage=[]

Gets or sets the weapon's critical damage multiplier. You can set a value between 0 and 100.
  • criticaldamage: (number)


Game.Weapon.bloodsucking[]

Gets or sets the weapon's vampire rate. You can set a value between 0 and 100.
  • bloodsucking: (number)


Game.Weapon.infiniteclip[]

Set the weapon's magazine to infinite.
  • infiniteclip: (bool)


Methods[]

Game.Weapon:CreateAndDrop (weaponid, position)[]

Creates and drops weapons at specific coordinates
Parameters:
  • weaponid: (Common.WEAPON) Weapon Type
  • position: (position) The position to drop after the weapon is created
Returns:
(Game.Weapon or nil) Incorrect ID or coordinates beyond the game's internal logical limit will return nil


Game.Weapon:GetWeaponType ()[]

Get the weapon's WEAPONTYPE value
Returns:
(Game.WEAPONTYPE)


Game.Weapon:AddClip1 (clip)[]

Replenishes the first clip among the clips used by the weapon.
Parameters:
  • clip: (int) clip
Advertisement