Counter-Strike: Global Offensive/Weapons
This listing is for weapons featured in.
New weapons include: Molotov grenades, which create a pool of fire in the ground, Decoy grenades, which create fake weapon sounds, and a taser melee weapon, the Zeus x27.
|Knives||Miscellaneous||Danger Zone||Melee||Co-op Strike|
To give yourself a weapon, you can use the cheat command
give <entityname>, which should spawn a specified weapon inside the executing player, for example
give weapon_awp. Knives and Danger Zone melees might instantly be removed by the game when they would spawn; To overcome this, one can use the command sequence
give <entityname>; ent_fire <entityname> addoutput "classname weapon_knifegg" (in one line!) so that the entity "becomes" an entity that is not removed by the game in the same tick. Note that some weapons have a different classname after being given, e.g.
give weapon_axe; ent_fire weapon_melee addoutput "classname weapon_knifegg".
Weapons can be manipulated via I/O, e.g. with
ent_fire, and even more using VScript. All weapon entities support the inputs
Kill, SetAmmoAmount <int>, SetReserveAmmoAmount <int>, ToggleCanBePickedUp, for example the command
ent_fire weapon_ak47 kill removes all AK-47s in the map. To give some inspiration, if
weapon is the VScript handle of a weapon entity, we can use
weapon.Destroy() to kill it,
weapon.GetOwner() == null to check whether it is dropped (true) or carried by a player (false),
EntFireByHandle(weapon, "SetReserveAmmoAmount", "0", 0, null, null) to remove its reserve ammo and much more.