WoLD Archives Search About Contact

World of Level Design

Tutorials to Becoming the Best Level Designer and Game Environment Artist (since 2008)

CS:GO SDK Automatically Assign Any Weapon to a Player On Spawn

Category: Source: CSGO SDK
May 12, 2016

If you are creating a training map focused on one weapon type such as ak-47, awp, deagle or revolver then you want to make sure the player spawns only with that weapon equipped.

You need to strip all weapons from player's inventory that are given to them by default and assign a weapon you want for them to spawn with.

For this to happen, you need to insert 1 game_player_equip entity into your map. Then you will be able to assign any weapon to a player upon spawn, automatically.

Step 1:

Enable Entity Tool (Shift+E):

Under Objects, scroll down to game_player_equip and select it:

Left click in perspective viewport to insert game_player_equip entity anywhere you want within the map:

Note: By inserting game_player_equip into your map, you will strip the player from any weapons on spawn.

Step 2:

Edit game_player_equip entity by selecting it and going into Object Properties (Alt+Enter) or double clicking on the entity:

Disable "SmartEdit":

Click on Add:

New box will pop up to enter a New Keyvalue. This is where you define which weapon you want the player to spawn with.

Here is what you need to input into each box:

  • Key: name of the weapon
  • Value: 1

Under Key property, input the name of the weapon you want to have the player spawn with.

Value property has to be set to 1.

Example of weapon_ak47:

Step 3:

Enter the name of the weapon you want the player to have. Here are all the weapon names you can use. These names have to be entered exactly how you see them here.

  • weapon_ak47
  • weapon_aug
  • weapon_awp
  • weapon_bizon
  • weapon_c4
  • weapon_cz75a
  • weapon_deagle
  • weapon_decoy
  • weapon_elite
  • weapon_famas
  • weapon_fiveseven
  • weapon_flashbang
  • weapon_g3sg1
  • weapon_galilar
  • weapon_glock
  • weapon_healthshot
  • weapon_hegrenade
  • weapon_hkp2000
  • weapon_incgrenade
  • weapon_knife
  • weapon_m249
  • weapon_m4a1
  • weapon_m4a1_silencer
  • weapon_mac10
  • weapon_mag7
  • weapon_molotov
  • weapon_mp7
  • weapon_mp9
  • weapon_negev
  • weapon_nova
  • weapon_p250
  • weapon_p90
  • weapon_revolver
  • weapon_sawedoff
  • weapon_scar20
  • weapon_sg556
  • weapon_smokegrenade
  • weapon_tagrenade
  • weapon_taser
  • weapon_tec9
  • weapon_ump45
  • weapon_usp_silencer
  • weapon_xm1014

You can also enable Entity Tool (Shift+E), use Objects drop down menu and scroll down to weapon_ to see proper names to enter.

Note: this is just to see which names you can use to enter into game_player_equip:

Step 4

If you want to remove any Keyvalue entries, select one and click on Delete:

Make sure you have "SmartEdit" disabled to delete.

Step 5:

Do not include buy zones if you do not want the player to purchase any weapons at the start.

Step 6:

Last, run a compile and test your map. You should now spawn with assigned weapons for both CT and T teams.

Read Next: CS:GO SDK Terminal Ballistics or How to Test if You Can Shoot Through Walls (Bullet Penetration)


Subscribe to receive NEW/UPDATED and FREE "UE5 Beginner's Quick Start Guide" PDF (90 pages).

Subscribe and Get Free UE5 PDF Guide

Visit this page for more info about the guide...

Follow WoLD







About World of Level Design

My name is AlexG. I am self-taught level designer, game environment artist and the creator of World of Level Design.com. I've learned everything I know from personal experimentation and decades of being around various online communities of fellow environment artist and level designers. On World of Level Design you will find tutorials to make you become the best level designer and game environment artist.

Read More »

Home Terms of Use/Trademarks/Disclaimers Privacy Policy Donate About Contact

All content on this website is copyrighted ©2008-2024 World of Level Design LLC. All rights reserved.
Duplication and distribution is illegal and strictly prohibited.

World of Level Design LLC is an independent company. World of Level Design website, its tutorials and products are not endorsed, sponsored or approved by any mentioned companies on this website in any way. All content is based on my own personal experimentation, experience and opinion. World of Level Design™ and 11 Day Level Design™ are trademarks of AlexG.

Template powered by w3.css