Buy: Difference between revisions
Jump to navigation
Jump to search
Note:The command buy also exists in
,
and
but simply opens the buy menu. For that purpose,
and
have the command buymenu instead.
(Created page with "<tt>'''buy'''</tt> is a console command in {{css|4}} and {{csgo|4}}. It is a non-cheat command for players to purchase weapons and equipment with their funds while th...") |
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
||
(18 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
<tt>''' | {{this is a|console command|name=buy|game=Counter-Strike: Source|game1=Counter-Strike: Global Offensive}} | ||
{{infotable | |||
|buy | |||
|type=c1 | |||
|engine=2 | |||
|in={{css|4}}<br>{{csgo|4}} | |||
}} | |||
{{Code|select=1|buy}} is a non-cheat command for [[player]]s to purchase weapons and equipment with their funds while they are allowed to buy, i.e. if the <tt>'''mp_buytime'''</tt> hasn't expired yet and if they are inside a {{ent|func_buyzone}}. | |||
{{note|The command <tt>buy</tt> also exists in {{cs}}, {{cscz}} and {{czds}} but simply opens the buy menu. For that purpose, {{css}} and {{csgo}} have the command <tt>'''[[#buymenu|buymenu]]'''</tt> instead.{{modernConfirm | Does {{czeror}} actually have a buymenu that will pop up, or is the command vestigial there?}} }} | |||
== Syntax == | == Syntax == | ||
{{pre| | {{pre| | ||
buy <item alias> | buy <item alias> | ||
}} | }} | ||
If the command is invoked with invalid or no arguments, it prints a list of valid arguments. | If the command is invoked with invalid or no arguments, it prints a list of valid arguments. | ||
{| | {{csgo}} There is the alternative syntax <tt>buy <?> <int></tt>. {{todo|What is the first parameter for? Appears to work with any first non-empty parameter.}} | ||
| | |||
{| | |||
|- style=vertical-align:top | |- style=vertical-align:top | ||
| | | | ||
{| class="standard-table" | |||
|+ Buy aliases in {{css}} | |||
! <tt>"buy <item>"</tt> | |||
!colspan=2| Item slot that is purchased from | |||
|- | |||
| <tt>primammo</tt> | |||
|- | |||
| <tt>secammo</tt> | |||
|- | |||
| <tt>vest</tt> || [[item_kevlar|Kevlar]] | |||
|rowspan=7| ''Eqiupment'' | |||
|- | |||
| <tt>vesthelm</tt> || [[item_assaultsuit|Kevlar + Helmet]] | |||
|- | |||
| <tt>defuser</tt> || [[item_defuser|Defusal Kit]] | |||
|- | |||
| <tt>nvgs</tt> || [[item_nvgs|Nightvision]] | |||
|- | |||
| <tt>flashbang</tt> || [[weapon_flashbang|Flashbang]] | |||
|- | |||
| <tt>hegrenade</tt> || [[weapon_hegrenade|HE Grenade]] | |||
|- | |||
| <tt>smokegrenade</tt> || [[weapon_smokegrenade|Smoke Grenade]] | |||
|- | |||
| <tt>galil</tt> || [[weapon_galil|IDF Defender]] | |||
|rowspan=10| ''Rifles'' | |||
|- | |||
| <tt>ak47</tt> || [[weapon_ak47|CV-47]] | |||
|- | |||
| <tt>scout</tt> || [[weapon_scout|Schmidt Scout]] | |||
|- | |||
| <tt>sg552</tt> || [[weapon_sg552|Krieg 552]] | |||
|- | |||
| <tt>awp</tt> || [[weapon_awp|Magnum Sniper Rifle]] | |||
|- | |||
| <tt>g3sg1</tt> || [[weapon_g3sg1|D3/AU-1]] | |||
|- | |||
}} | | <tt>famas</tt> || [[weapon_famas|Clarion 5.56]] | ||
|- | |||
| <tt>m4a1</tt> || [[weapon_m4a1|Maverick M4A1 Carabine]] | |||
|- | |||
| <tt>aug</tt> || [[weapon_aug|Bullpup]] | |||
|- | |||
| <tt>sg550</tt> || [[weapon_sg550|Krieg 550 Commando]] | |||
|- | |||
| <tt>glock</tt> || [[weapon_glock|9x19mm Sidearm]] | |||
|rowspan=6| ''Pistols'' | |||
|- | |||
| <tt>usp</tt> || [[weapon_usp|KM .45 Tactical]] | |||
|- | |||
| <tt>p228</tt> || [[weapon_p228|228 Compact]] | |||
|- | |||
| <tt>deagle</tt> || [[weapon_deagle|Night Hawk .50C]] | |||
|- | |||
| <tt>elite</tt> || [[weapon_elite|.40 Dual Elites]] | |||
|- | |||
| <tt>fiveseven, fn57</tt> || [[weapon_fiveseven|ES Five-SeveN]] | |||
|- | |||
| <tt>m3</tt> || [[weapon_m3|Leone 12 Gauge Super]] | |||
|rowspan=2| ''Shotguns'' | |||
|- | |||
| <tt>xm1014</tt> || [[weapon_xm1014|Leone YG1265 Auto Shotgun]] | |||
|- | |||
| <tt>mac10</tt> || [[weapon_mac10|Ingram MAC-10]] | |||
|rowspan=5| ''SMG'' | |||
|- | |||
| <tt>tmp</tt> || [[weapon_tmp|Schmidt Machine Pistol]] | |||
|- | |||
| <tt>mp5, mp5navy</tt> || [[weapon_mp5navy|KM Sub-Machine Gun]] | |||
|- | |||
| <tt>ump45</tt> || [[weapon_ump45|KM UMP45]] | |||
|- | |||
| <tt>p90</tt> || [[weapon_p90|ES C90]] | |||
|- | |||
| <tt>m249</tt> || [[weapon_m249|M249]] | |||
|rowspan=1| ''Machine Guns'' | |||
|} | |||
{{ModernExample|<code>"buy awp"</code> tries to buy an AWP.}} | |||
| | | | ||
{| class="standard-table" | {| class="standard-table" | ||
Line 71: | Line 117: | ||
| 4 || <tt>p250</tt> || [[weapon_p250|P250]] | | 4 || <tt>p250</tt> || [[weapon_p250|P250]] | ||
|- | |- | ||
| 5 || <tt>tec9, fn57</tt> || [[weapon_tec9|Tec-9]] | | 5 || <tt>tec9, fn57, fiveseven</tt> || [[weapon_tec9|Tec-9]] / [[weapon_cz75a|CZ75-Auto]] / [[weapon_fiveseven|Five-SeveN]] | ||
|- | |- | ||
| 6 || <tt>deagle</tt> || [[weapon_deagle|Desert Eagle]] / [[weapon_revolver|R8 Revolver]] | | 6 || <tt>deagle</tt> || [[weapon_deagle|Desert Eagle]] / [[weapon_revolver|R8 Revolver]] | ||
Line 142: | Line 188: | ||
| 37 || || - | | 37 || || - | ||
|} | |} | ||
{{ | {{ModernExample|<code>"buy awp"</code> or <code>"buy 1 18"</code> tries to buy an AWP.}} | ||
{{note|Everything has a string alias except for the [[weapon_shield|Riot Shield]]. Use <code>"buy 1 25"</code> to buy it via command.}} | |||
{{ModernDeprecated|Can't <code>buy [[item_heavyassaultsuit|heavyarmor]]</code> anymore, independent of <tt>mp_weapons_allow_heavyassaultsuit</tt>,<br>even though <tt>heavyarmor</tt> is still listed when invoking <tt>buy</tt> with invalid or no arguments.}} | |||
{{tip|To prevent weapons from being purchased, see {{ent|mp_buy_allow_guns}}, {{ent|mp_items_prohibited}} etc.}} | |||
|} | |} | ||
== Related | == Related Console Commands and Variables == | ||
{| class=standard-table | {| class=standard-table | ||
! ConVar !! Default value !! Description | ! ConCommand/ConVar !! Default value !! Description | ||
|- | |- id="autobuy" | ||
| <tt>mp_buytime</tt> || {{css}} 1.5 {{csgo}} 90 || The time in {{css}} minutes {{csgo}} seconds from the start of the round that players are still allowed to buy. | | <tt>autobuy</tt> || ''[[ConCommand]]'' || Attempts to purchase items with the order listed in <tt>cl_autobuy</tt>. Buys at most one primary and at most one secondary. | ||
|- | |- id="cl_autobuy" | ||
| {{csgo}} <tt>mp_buy_anywhere</tt> || 0 || Determines which teams are allowed to buy anywhere in the map and not just in func_buyzones. | | <tt>cl_autobuy</tt> || <tt>""</tt> || A space-delimited list of buy aliases (see above) in the order in which <tt>autobuy</tt> will attempt to purchase them. {{csgo}} See <code>csgo/autobuy.txt</code>. | ||
|- id="rebuy" | |||
| <tt>rebuy</tt> || ''ConCommand'' || Attempts to repurchase items with the order listed in <tt>cl_rebuy</tt>. By default, this results in trying to buy the exact loadout that the executing player had when they had bought something for the last time. | |||
|- id="cl_rebuy" | |||
| <tt>cl_rebuy</tt> || <tt>""</tt> || A space-delimited list of item categories in the order in which <tt>rebuy</tt> will attempt to repurchase them. Categories are: <tt>PrimaryWeapon, PrimaryAmmo, SecondaryWeapon, SecondaryAmmo, Defuser, Armor, HEGrenade, Flashbang, SmokeGrenade, NightVision ({{csgo}} Molotov, IncGrenade, Decoy, Taser)</tt>. {{csgo}} See <code>csgo/rebuy.txt</code>. | |||
|- id="buymenu" | |||
| <tt>buymenu</tt> || ''ConCommand'' || Opens or closes the buy menu.<br>{{csgo}} In {{csgo mode|Retakes}}, shows or hides the loadout cards in the freezetime or during warmup. | |||
|- id="mp_buytime" | |||
| <tt>mp_buytime</tt> || <tt style=white-space:nowrap>{{css}} 1.5 {{csgo}} 90</tt> || The time in {{css}} minutes / {{csgo}} seconds from the start of the round that players are still allowed to buy. | |||
|- id="mp_buy_anywhere" | |||
| {{csgo}} <tt>mp_buy_anywhere</tt> || <tt>0</tt> || Determines which teams are allowed to buy anywhere in the map and not just in func_buyzones. | |||
*1: Both | *1: Both | ||
*2: Ts only | *2: Ts only | ||
*3: CTs only | *3: CTs only | ||
*''else'': None | *''else'': None | ||
|- | |- id="sv_buy_status_override" | ||
| {{csgo}} | | <tt style=white-space:nowrap>{{csgo}} sv_buy_status_override</tt> || <tt>-1</tt> || Overrides which teams are allowed to buy at all. Changing this value takes effect in the next round. | ||
*0: Both | *0: Both | ||
*1: CTs only | *1: CTs only | ||
*2: Ts only | *2: Ts only | ||
*''else'': Don't override, read from {{ent|info_map_parameters}}, else Both | *''else'': Don't override, read from {{ent|Info_map_parameters/Counter-Strike_series|alt=info_map_parameters}}, else Both | ||
|} | |} |
Latest revision as of 20:03, 17 May 2024
buy
is a console command available in Counter-Strike: Source and
Counter-Strike: Global Offensive.
buy | |
---|---|
Type | Console Command |
Engine | ![]() |
Availability | ![]() ![]() |
buy is a non-cheat command for players to purchase weapons and equipment with their funds while they are allowed to buy, i.e. if the mp_buytime hasn't expired yet and if they are inside a func_buyzone.






Syntax
buy <item alias>
If the command is invoked with invalid or no arguments, it prints a list of valid arguments.
There is the alternative syntax buy <?> <int>.
Todo: What is the first parameter for? Appears to work with any first non-empty parameter.
![]() "buy awp" tries to buy an AWP. |
![]() "buy awp" or "buy 1 18" tries to buy an AWP.![]() "buy 1 25" to buy it via command.![]() buy heavyarmor anymore, independent of mp_weapons_allow_heavyassaultsuit,even though heavyarmor is still listed when invoking buy with invalid or no arguments. ![]() |
Related Console Commands and Variables
ConCommand/ConVar | Default value | Description |
---|---|---|
autobuy | ConCommand | Attempts to purchase items with the order listed in cl_autobuy. Buys at most one primary and at most one secondary. |
cl_autobuy | "" | A space-delimited list of buy aliases (see above) in the order in which autobuy will attempt to purchase them. ![]() csgo/autobuy.txt .
|
rebuy | ConCommand | Attempts to repurchase items with the order listed in cl_rebuy. By default, this results in trying to buy the exact loadout that the executing player had when they had bought something for the last time. |
cl_rebuy | "" | A space-delimited list of item categories in the order in which rebuy will attempt to repurchase them. Categories are: PrimaryWeapon, PrimaryAmmo, SecondaryWeapon, SecondaryAmmo, Defuser, Armor, HEGrenade, Flashbang, SmokeGrenade, NightVision (![]() ![]() csgo/rebuy.txt .
|
buymenu | ConCommand | Opens or closes the buy menu.![]() ![]() |
mp_buytime | ![]() ![]() |
The time in ![]() ![]() |
![]() |
0 | Determines which teams are allowed to buy anywhere in the map and not just in func_buyzones.
|
![]() |
-1 | Overrides which teams are allowed to buy at all. Changing this value takes effect in the next round.
|