Category:Counter-Strike: Global Offensive Weapons: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added section Manipulating Weapons.)
(Swapping redirects, making "CS:GO weapons" the main category and "CS:GO Weapons" the redirect. Following english wiki's suggestion to use sentence case for categories.)
Tag: New redirect
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This listing is for weapons featured in {{game name|name=Counter-Strike: Global Offensive}}.
#REDIRECT [[Category:Counter-Strike: Global Offensive weapons]]
__NOTOC__
=== Buy Menu ===
{| class="standard-table"
! Pistol
! SMG
! Heavy
! Rifle
! Equipment
! Grenade
|- style="vertical-align:top;"
|
* [[weapon_glock|Glock-18]] / [[weapon_hkp2000|P2000]] / [[weapon_usp_silencer|USP-S]]
* [[weapon_elite|Dual Berettas]]
* [[weapon_p250|P250]]
* [[weapon_tec9|Tec-9]] / [[weapon_cz75a|CZ75-Auto]] / [[weapon_fiveseven|Five-SeveN]]
* [[weapon_deagle|Desert Eagle]] / [[weapon_revolver|R8 Revolver]]
|
* [[weapon_mac10|MAC-10]] / [[weapon_mp9|MP9]]
* [[weapon_mp7|MP7]] / [[weapon_mp5sd|MP5-SD]]
* [[weapon_ump45|UMP-45]]
* [[weapon_p90|P90]]
* [[weapon_bizon|PP-Bizon]]
|
* [[weapon_nova|Nova]]
* [[weapon_xm1014|XM1014]]
* [[weapon_sawedoff|Sawed-Off]] / [[weapon_mag7|MAG-7]]
* [[weapon_m249|M249]]
* [[weapon_negev|Negev]]
* [[weapon_shield|Riot Shield]] (''only in'' {{csgo mode|casual}})
|
* [[weapon_galil|Galil AR]] / [[weapon_famas|FAMAS]]
* [[weapon_ak47|AK-47]] / [[weapon_m4a1|M4A4]] / [[weapon_m4a1_silencer|M4A1-S]]
* [[weapon_ssg08|SSG 08]]
* [[weapon_sg556|SG 553]] / [[weapon_aug|AUG]]
* [[weapon_awp|AWP]]
* [[weapon_g3sg1|G3SG1]] / [[weapon_scar20|SCAR-20]]
|
* [[item_kevlar|Kevlar Vest]]
* [[item_assaultsuit|Kevlar + Helmet]]
* [[weapon_taser|Zeus x27]]
* [[item_defuser|Defuse Kit]] / [[item_cutters|Rescue Kit]]
|
* [[weapon_molotov|Molotov]] / [[weapon_incgrenade|Incendiary Grenade]]
* [[weapon_decoy|Decoy Grenade]]
* [[weapon_flashbang|Flashbang]]
* [[weapon_hegrenade|HE Grenade]]
* [[weapon_smokegrenade|Smoke Grenade]]
|}
 
=== Other ===
{| class="standard-table"
! Knives
! Miscellaneous
! {{csgo mode|Dz}}
! {{csgo mode|dz}} Melee
! {{csgo mode|Coop}}
|- style="vertical-align:top;"
|
* [[weapon_knife|Knife (CT)]] / [[weapon_knife_t|Knife (T)]]
* [[weapon_knifegg|Golden Knife]] (''only in'' {{csgo mode|ar}})
* [[weapon_karambit|Karambit]]
* [[weapon_gut|Gut Knife]]
* ...
* [[weapon_knife_ghost|Spectral Shiv]]
|
* [[weapon_c4|C4]]
* [[weapon_healthshot|Medi-Shot]]
* [[weapon_shield|Riot Shield]]
* [[item_heavyassaultsuit|Heavy Assaultsuit]]
* [[weapon_snowball|Snowball]]
|
* [[weapon_tablet|Tablet]]
* [[weapon_bumpmine|Bump Mine]]
* [[weapon_breachcharge|Breachcharge]]
* [[weapon_firebomb|Fire Bomb]]
* [[weapon_diversion|Diversion Device]]
* [[weapon_frag_grenade|Frag Grenade]]
* [[exojump|ExoJump]]
* [[Parachute]]
|
* [[weapon_fists|Bare Hands]]
* [[weapon_spanner|Wrench]]
* [[weapon_hammer|Hammer]]
* [[weapon_axe|Axe]]
* ([[weapon_melee]])
|
* [[weapon_tagrenade|Tactical Awareness Grenade]]
* [[weapon_zone_repulsor|Repulsor Device]]
|}
 
=== Giving Weapons ===
To give yourself a weapon, you can use the [[cheat]] command <code>[[give]] <entityname></code>, which should spawn a specified weapon inside the executing [[player]], for example <code>give weapon_awp</code>. 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 <code>give <entityname>; ent_fire <entityname> addoutput "classname weapon_knifegg"</code> (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. <code>give weapon_axe; ent_fire weapon_melee addoutput "classname weapon_knifegg"</code>.
 
Map driven item giving can be done with [[game_player_equip]]. To equip weapons using [[VScript]], a game_player_equip entity can be [[CS:GO VScript Examples#Equip players|created, used and removed]].
 
=== Manipulating Weapons ===
Weapons can be manipulated via [[I/O]], e.g. with {{ent|ent_fire}}, and even more using [[VScript]]. All weapon entities support the inputs <code>Kill, SetAmmoAmount <int>, SetReserveAmmoAmount <int>, ToggleCanBePickedUp</code>, for example the command <code>ent_fire weapon_ak47 kill</code> removes all AK-47s in the map. To give some inspiration, if <code>weapon</code> is the VScript handle of a weapon entity, we can use <code>weapon.Destroy()</code> to kill it, <code>weapon.GetOwner() == null</code> to check whether it is dropped (true) or carried by a player (false), <code>[[List of CS:GO Script Functions#Other|EntFireByHandle]](weapon, "SetAmmoAmount", "0", 0, null, null)</code> to remove its reserve ammo and much more.
{{note|When the weapon is killed that a player has deployed, their viewmodel will be broken until they deploy another weapon.}}
{{tip|Some weapon entities will have the same classname after being spawned even though they were created from different classnames. This makes it impossible to target only one of these weapon classes in the [[I/O]] system such as [[weapon_mp5sd|MP5-SD]] and [[weapon_mp7|MP7]] entities, because both will have the classname <code>"weapon_mp7"</code> after being spawned, so firing I/O events to <code>weapon_mp5sd</code> won't have any effect. This problem can be bypassed in VScript: If we find an <code>entity</code> with the classname <code>"weapon_mp7"</code>, we can identify whether it is actually an MP5-SD or an MP7 by checking whether <code>entity.GetModelName()</code> returns either <code>"models/weapons/w_smg_mp5sd_dropped.mdl"</code> or <code>"models/weapons/w_smg_mp7_dropped.mdl"</code>. Other entities whose classname changes on spawn are the [[weapon_usp_silencer|USP-S]], [[weapon_cz75a|CZ75-Auto]], [[weapon_revolver|R8 Revolver]], [[weapon_m4a1_silencer|M4A1-S]], [[item_cutters|Rescue Kit]], [[weapon_spanner|Wrench]], [[weapon_hammer|Hammer]], [[weapon_axe|Axe]] and all knives except [[weapon_knife]] and [[weapon_knifegg]].}}
 
[[Category:Counter-Strike: Global Offensive]]
[[Category:Counter-Strike: Global Offensive Entities]]
[[Category:Weapons]]

Latest revision as of 05:52, 9 September 2023

Pages in category "Counter-Strike: Global Offensive Weapons"

The following 9 pages are in this category, out of 9 total.