Buy: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 Note:The command buy also exists in
Note:The command buy also exists in  ,
,  and
 and  but simply opens the buy menu. For that purpose,
 but simply opens the buy menu. For that purpose,  and
 and  have the command buymenu instead.
 have the command buymenu instead. 
		
	
| No edit summary | m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) | ||
| (7 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
| {{ | {{this is a|console command|name=buy|game=Counter-Strike: Source|game1=Counter-Strike: Global Offensive}} | ||
| {{infotable | {{infotable | ||
| |buy | |buy | ||
| Line 7: | Line 6: | ||
| |in={{css|4}}<br>{{csgo|4}} | |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}}. | {{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 == | ||
| Line 18: | Line 16: | ||
| 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>. {{ | {{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.}} | ||
| {| | {| | ||
| Line 191: | Line 189: | ||
| |} | |} | ||
| {{ModernExample|<code>"buy awp"</code> or <code>"buy 1 18"</code> tries to buy an AWP.}} | {{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.}} | {{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.}} | ||
| |} | |} | ||
Latest revision as of 20:03, 17 May 2024
buy  is a   console command  available in  Counter-Strike: Source and
 Counter-Strike: Source and  Counter-Strike: Global Offensive.
 Counter-Strike: Global Offensive.
| buy | |
|---|---|
| Type | Console Command | 
| Engine |  Source | 
| Availability |  Counter-Strike: Source  Counter-Strike: Global Offensive | 
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.
 Note:The command buy also exists in
Note:The command buy also exists in  ,
,  and
 and  but simply opens the buy menu. For that purpose,
 but simply opens the buy menu. For that purpose,  and
 and  have the command buymenu instead.
 have the command buymenu instead. 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>.
 There is the alternative syntax buy <?> <int>. 
Todo: What is the first parameter for? Appears to work with any first non-empty parameter.
| 
  Example: "buy awp"tries to buy an AWP. | 
  Example: "buy awp"or"buy 1 18"tries to buy an AWP. Note:Everything has a string alias except for the Riot Shield. Use "buy 1 25"to buy it via command. Deprecated:Can't buy heavyarmoranymore, independent of mp_weapons_allow_heavyassaultsuit,even though heavyarmor is still listed when invoking buy with invalid or no arguments.  Tip:To prevent weapons from being purchased, see mp_buy_allow_guns, mp_items_prohibited etc. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.  See 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 (  Molotov, IncGrenade, Decoy, Taser).  See csgo/rebuy.txt. | 
| buymenu | ConCommand | Opens or closes the buy menu.  In  Retakes, shows or hides the loadout cards in the freezetime or during warmup. | 
| mp_buytime |  1.5  90 | The time in  minutes /  seconds from the start of the round that players are still allowed to buy. | 
|  mp_buy_anywhere | 0 | Determines which teams are allowed to buy anywhere in the map and not just in func_buyzones. 
 | 
|  sv_buy_status_override | -1 | Overrides which teams are allowed to buy at all. Changing this value takes effect in the next round. 
 | 
 Confirm:
 Confirm: