CS2 Gen Code: Definition and How to Apply It

CS2 Gen Codes are commands used for quick generation of specific in-game items (weapon skins, stickers, etc.). While you obviously can’t use these in regular games, they’re super convenient for creating cool item sets and sharing ideas with friends. Besides, a skin doesn't always look the same as in marketplace preview, so you might want to test specific items before making a purchase. In this guide, you'll learn how to generate and use CS2 gen codes for whatever needs you have.
What Is a CS2 Gen Code?
Basically, a gen code is a text command that allows a player to generate any CS2 skin. The structure of a CS2 gen code depends on the weapon or item you want to get, as well as its pattern and float value. Here's what a typical gen code consists of: !gen [Weapon ID] [Skin ID] [Pattern Index] [Float Value]
.

Let’s generate an AK-47 Bloodsport, for example. First of all, you need to find a !gen compatible server. If you don’t know where to find one, we suggest you check our article about CS2 skin inspection servers. Once you find the server and connect, you’ll need to open the developer’s console and enter the desired item’s code. The code for a Factory New Bloodsport is !gen 7 639 1 0.05
(don’t worry, we’ll explain how to get a gen code in CS2 a bit later).


Want to try out a higher float? You’ll just need to change the latest figure from 0.05 to 1, making the gen code look like this: !gen 7 639 1 1
.

But how would you know which numbers to change to test different parameters? Let’s deconstruct a gen code and see how it works.
Weapon type ID
First, you need to specify what weapon you want to get. Each gun, knife, or glove set in the game has a unique identification number. You can find the full list below:
Knives
- Bayonet
500
; - Bowie
514
; - Butterfly
515
; - Default CT
42
; - Default T
59
; - Falchion
512
; - Flip
505
; - Gut
506
; - Huntsman
509
; - Karambit
507
; - M9 Bayonet
508
; - Navaja
520
; - Nomad
521
; - Paracord
517
; - Shadow Daggers
516
; - Skeleton
525
; - Stiletto
522
; - Survival
518
; - Talon
523
.
Pistols
- P2000
32
; - P250
36
; - Desert Eagle
1
; - Dual Berettas
2
; - Five-Seven
3
; - Glock-18
4
; - Tec-9
30
; - USP-S
61
; - CZ75-Auto
63
; - R8 Revolver
64
.
Rifles
- AK-47
7
; - AUG
8
; - AWP
9
; - Famas
10
; - G3SG1
11
; - Galil AR
13
; - M4A4
16
; - SCAR-20
38
; - SG 553
39
; - SSG 08
40
; - M4A1-S
60
.
SMGs
- MAC-10
17
; - P90
19
; - MP5-SD
23
; - UMP-45
24
; - PP-Bizon
26
; - MP7
33
; - MP9
34
.
Heavy
- M249
14
; - XM1014
25
; - MAG-7
27
; - Negev
28
; - Sawed-Off
29
; - Nova
35
.
Gloves
- Bloodhound
5027
; - Sports
5030
; - Driver
5031
; - Hand Wraps
5032
; - Moto
5033
; - Specialist
5034
; - Hydra
5035
.
Skin ID
The second figure indicates the skin applied to the weapon. Listing all the skin IDs here would take us another month, but luckily, you can check it on pretty much any marketplace. Choose the skin you’d like to try and look for lines like Finish Catalog. For example, for AK-47 | Bloodsport, the skin ID is 639
.

Seed/Pattern Index
This value determines the item’s pattern, which is a number that decides how a skin’s texture wraps around a weapon model. Each weapon skin comes with 1,000 possible pattern variations, meaning even skins of the same type and quality can look different based on their pattern index.
For example, a skin like an AK-47 | Case Hardened can range from mostly blue (a rare and expensive "blue gem") to gold to random splashes of both, all depending on the pattern index. Let’s generate a blue gem #555 using !gen 7 44 555 0.38
:

Now, let’s switch the 3rd value to 237
and see what’ll happen to the finish:

The difference is not always as striking as in this case, but pattern can be a determining factor in how pricey and desirable a skin is.
Wear value (float) ID
The last figure represents the float value, or, in other words, its condition. This indicator ranges from 0 (the best) to 1 (the worst) but may vary depending on the weapon. Here's how these numbers correspond to in-game wear:
- Factory New: 0–0.07;
- Minimal Wear: 0.07–0.15;
- Field-Tested: 0.15–0.38;
- Well-Worn: 0.38–0.45;
- Battle-Scarred: 0.45 – 1.00.
Note: The number of digits after the decimal point can well exceed 10+ if you have a very precise condition in mind.
Why is CS2 Gen Code Needed?
Here are the most common use cases for gen codes:
Inspect and Customize
Generally, if a player suddenly wants to know how to get a gen code in CS2, in nine cases out of ten it’s to inspect a skin they want to buy. Most people you’ll see on a gen server are giving their future weapon a test run. This feature is pretty useful, especially when dealing with high-value purchases.
Compare
There are situations when two skins that look almost identical have different prices. For example, FT weapons with lower float can cost 5 times less than the MW version of the same skin. For regular players, it’s more about the look than actual wear, so it’s a good idea to check if more expensive skin variants are worth overpaying.
Trade
Gen codes are also very handy when it comes to trading. People can use a CS2 gen code to showcase their items to potential buyers. While also more suitable to high-value deals, it surely saves time and prevents confusion later on.
Recreate
Another fun way to use CS2 skin gen code is to copy iconic weapons of pro players, streamers, etc. With all the information available today, players can easily get their hands on guns like s1mple’s Dragon Lore, kennyS’ Azimov, ScreaM’s AK, and more.
Final Thoughts
That’s it! Now you know how to use gen codes in CS2, and can go flex on your friends (or potential buyers). While the system might seem complex, it follows a simple formula and so shouldn’t create much trouble for you. Once you figure it out, just find a !gen server address and have fun exploring any skin variations you can come up with.