Difference between revisions of "Give"

From Valve Developer Community
Jump to: navigation, search
(Rewrote the entire article, removing the stupid weapon lists.)
Line 1: Line 1:
{{wrongtitle|title=give}}
+
A [[Developer Console|console]] command that gives the player (or, rather, spawns beneath its feet) the entity that is given as the commands parameter (typically of a ''weapon_'', an ''item_'' or an ''item_ammo_'' type).
  
To use the "Give" command, you must have sv_cheats set to 1.<br>
+
'''Examples:'''
"Give" gives you an entity (or, rather, spawns that entity beneath your feet.)<br>
+
*In [[Half-Life 2]], "give [[item_suit]]" will give the player the HEV suit.
"Give" commands are used in this way: give [entity name here.]<BR>
+
*In [[Counter-Strike: Source]], "give [[weapon_m3]]" will give the player an M3 shotgun.
To spawn a Weapon: give [weapon name here.]<br><br>
 
The Weapon names for Counter-Strike Source are:<br>
 
'''Rifles'''
 
  
weapon_m4a1 (M4A1)<br>
+
The entities available differs greatly depending on the game engine which the command is used in.
weapon_p90 (P90 or C90(Thats copyright)<br>
 
weapon_ak47 (AK47 or Cv47)<br>
 
weapon_aug (Bullpup)<br>
 
weapon_g3sg1 (G3SG1)<br>
 
weapon_m249 (M249)<br>
 
weapon_m3 (M3 Shotgun)<br>
 
weapon_mac10 (Mac10)<br>
 
weapon_mp5navy (MP5)<br>
 
weapon_sg552 (SG552)<br>
 
weapon_scout (Scout Sniper)<br>
 
weapon_sg550 (SG550)<br>
 
weapon_ump45 (UMP)<br>
 
weapon_tmp (TMP)<br>
 
weapon_xm1014 (Auto Shotgun)<br>
 
weapon_awp (Heavy Snipe)<br>
 
weapon_galil (IDF Defender)<br>
 
weapon_famas (Famas)<br>
 
<br>'''Pistols'''<br>
 
  
weapon_deagle (Desert Eagle)<br>
+
This command is a [[sv_cheats|cheat]].
weapon_usp (USP)<br>
 
weapon_glock (Glock)<br>
 
weapon_p228 (P228)<br>
 
weapon_elite (Dual Elites)<br>
 
weapon_fiveseven (FiveSeven)<br><br>
 
  
{{CCExample|In Counter-Strike Source, this equips you with a shotgun: |give [[weapon_m3]]}}
+
{{tip|Using a [[point_servercommand]] entity to "''give''" the player something, is usually more reliable than the [[point_template]] ''ForceSpawn'' seen in the [[Newgame_spawn]] [[prefab]], because the ''give'' command is not bound to a physical place, whereas the ''point_template'' will dump entities at the original spawnpoint upon a ''buildcubemaps'' command.}}
  
{{CCExample|In Half-Life 2, this equips you with a shotgun: |give [[weapon_shotgun]]}}
+
== See also ==
  
[[Category:Console Commands]]
+
* [[:Category:Weapons]] - A list of [[Half-Life 2]] weapons.
 +
* [[:Category:Items]] - A list of [[Half-Life 2]] items and ammo.
 +
* [[:Category:Counter-Strike:_Source_Entities]] - A list of mostly [[Counter-Strike: Source]] weapons and ammo.
 +
 
 +
 
 +
[[Category: Console Commands]]

Revision as of 01:16, 14 February 2011

A console command that gives the player (or, rather, spawns beneath its feet) the entity that is given as the commands parameter (typically of a weapon_, an item_ or an item_ammo_ type).

Examples:

The entities available differs greatly depending on the game engine which the command is used in.

This command is a cheat.

Tip:Using a point_servercommand entity to "give" the player something, is usually more reliable than the point_template ForceSpawn seen in the Newgame_spawn prefab, because the give command is not bound to a physical place, whereas the point_template will dump entities at the original spawnpoint upon a buildcubemaps command.

See also