Summer 2026 Music Kit Competition is now here! - Create a summer themed electronic music kit and submit it by - Enter Now!
Enum objects are immutable collections of named constants imported from lambda_script/point_script. Use the named properties instead of hard-coded numbers; the Counter-Strike enum values in particular come from the active gamemode integration.
The immutable HUD export supplies destinations for the broadcast and per-player PrintMessage functions:
| Property | Garry's Mod constant | Destination |
|---|---|---|
HUD.PRINTNOTIFY |
HUD_PRINTNOTIFY |
Legacy notification; currently behaves like console output. |
HUD.PRINTCONSOLE |
HUD_PRINTCONSOLE |
Console. |
HUD.PRINTTALK |
HUD_PRINTTALK |
Chat and console. |
HUD.PRINTCENTER |
HUD_PRINTCENTER |
Center of the player's screen. |
Input supplies the IN_* action flags for the player input methods:
import { Input, Instance } from "lambda_script/point_script";
const player = Instance.GetPlayerController(0);
if (player?.WasInputJustPressed(Input.JUMP)) {
Instance.Msg("jump pressed");
}
if (player?.IsInputPressed(Input.ATTACK | Input.ATTACK2)) {
Instance.Msg("a fire input is held");
}
| Property | Garry's Mod constant |
|---|---|
Input.ATTACK |
IN_ATTACK |
Input.JUMP |
IN_JUMP |
Input.DUCK |
IN_DUCK |
Input.FORWARD |
IN_FORWARD |
Input.BACK |
IN_BACK |
Input.USE |
IN_USE |
Input.CANCEL |
IN_CANCEL |
Input.LEFT |
IN_LEFT |
Input.RIGHT |
IN_RIGHT |
Input.MOVE_LEFT |
IN_MOVELEFT |
Input.MOVE_RIGHT |
IN_MOVERIGHT |
Input.ATTACK2 |
IN_ATTACK2 |
Input.RUN |
IN_RUN |
Input.RELOAD |
IN_RELOAD |
Input.ALT1 |
IN_ALT1 |
Input.ALT2 |
IN_ALT2 |
Input.SCORE |
IN_SCORE |
Input.SPEED |
IN_SPEED |
Input.WALK |
IN_WALK |
Input.ZOOM |
IN_ZOOM |
Input.WEAPON1 |
IN_WEAPON1 |
Input.WEAPON2 |
IN_WEAPON2 |
Input.BULLRUSH |
IN_BULLRUSH |
Input.GRENADE1 |
IN_GRENADE1 |
Input.GRENADE2 |
IN_GRENADE2 |
Combined masks match when any requested flag matches. Input reflects Source's server-side, tick-based button state; it does not add CS2-style subtick input history.
TraceMask supplies Source trace-mask constants for Instance.TraceLine and Instance.TraceBox:
import { Instance, TraceMask } from "lambda_script/point_script";
const trace = Instance.TraceLine({
start,
end,
mask: TraceMask.SHOT,
});
| Property | Source constant | Purpose |
|---|---|---|
TraceMask.ALL |
MASK_ALL |
All contents. |
TraceMask.SOLID |
MASK_SOLID |
Contents normally treated as solid. This is the default trace mask. |
TraceMask.PLAYER_SOLID |
MASK_PLAYERSOLID |
Contents that block player movement. |
TraceMask.NPC_SOLID |
MASK_NPCSOLID |
Contents that block NPC movement. |
TraceMask.WATER |
MASK_WATER |
Water, slime, and moveable water contents. |
TraceMask.OPAQUE |
MASK_OPAQUE |
Contents that block lighting. |
TraceMask.OPAQUE_AND_NPCS |
MASK_OPAQUE_AND_NPCS |
Opaque contents plus NPCs. |
TraceMask.BLOCK_LOS |
MASK_BLOCKLOS |
Contents that block AI line of sight. |
TraceMask.BLOCK_LOS_AND_NPCS |
MASK_BLOCKLOS_AND_NPCS |
AI line-of-sight blockers plus NPCs. |
TraceMask.VISIBLE |
MASK_VISIBLE |
Contents that block player visibility. |
TraceMask.VISIBLE_AND_NPCS |
MASK_VISIBLE_AND_NPCS |
Player-visibility blockers plus NPCs. |
TraceMask.SHOT |
MASK_SHOT |
Contents hit by bullet traces. |
TraceMask.SHOT_HULL |
MASK_SHOT_HULL |
Hull weapon trace contents, including grates. |
TraceMask.SHOT_PORTAL |
MASK_SHOT_PORTAL |
Portal-style shot contents. |
TraceMask.SOLID_BRUSH_ONLY |
MASK_SOLID_BRUSHONLY |
Normally solid world and brush contents, excluding NPCs. |
TraceMask.PLAYER_SOLID_BRUSH_ONLY |
MASK_PLAYERSOLID_BRUSHONLY |
Player-solid world and brush contents. |
TraceMask.NPC_SOLID_BRUSH_ONLY |
MASK_NPCSOLID_BRUSHONLY |
NPC-solid world and brush contents. |
TraceMask.NPC_WORLD_STATIC |
MASK_NPCWORLDSTATIC |
Static world contents used by NPC routing. |
TraceMask.SPLIT_AREAPORTAL |
MASK_SPLITAREAPORTAL |
Water and slime contents that split area portals. |
TraceMask.CURRENT |
MASK_CURRENT |
Directional current contents. |
TraceMask.DEAD_SOLID |
MASK_DEADSOLID |
Contents that block corpse movement. |
Each property is an exact unsigned 32-bit number. Masks can be combined with JavaScript bitwise operators:
const mask = TraceMask.SOLID | TraceMask.WATER;
JavaScript bitwise results are signed 32-bit numbers. The trace functions preserve their underlying 32-bit mask pattern.
Counter-Strike team identifiers:
| Property | Meaning |
|---|---|
CSTeam.NONE |
No Counter-Strike team. |
CSTeam.TERRORIST |
Terrorist team. |
CSTeam.CT |
Counter-Terrorist team. |
Reasons reported to CS.OnRoundEnd:
| Property | Meaning |
|---|---|
CSRoundEndReason.TIME |
The round timer expired. |
CSRoundEndReason.TARGET_BOMBED |
The planted bomb exploded. |
CSRoundEndReason.TARGET_SAVED |
The bomb target was saved by a defuse. |
CSRoundEndReason.ELIMINATION |
A team won by eliminating its opponents. |
CSRoundEndReason.HOSTAGES_RESCUED |
The hostages were rescued. |
Counter-Strike weapon categories:
| Property | Meaning |
|---|---|
CSWeaponType.KNIFE |
Knife or melee weapon. |
CSWeaponType.PISTOL |
Pistol. |
CSWeaponType.SUBMACHINEGUN |
Submachine gun. |
CSWeaponType.RIFLE |
Rifle. |
CSWeaponType.SHOTGUN |
Shotgun. |
CSWeaponType.SNIPER_RIFLE |
Sniper rifle. |
CSWeaponType.MACHINEGUN |
Machine gun. |
CSWeaponType.C4 |
C4 bomb. |
CSWeaponType.GRENADE |
Grenade. |
CSWeaponType.EQUIPMENT |
Equipment item. |
CSWeaponType.STACKABLEITEM |
Stackable item. |
CSWeaponType.UNKNOWN |
Unknown or uncategorized weapon. |
Values returned by CS.GetRoundState and accepted by CS.SetRoundState:
| Property | Meaning |
|---|---|
CSRoundState.NONE |
No active round state. |
CSRoundState.WARMUP |
Warmup. |
CSRoundState.FREEZETIME |
Pre-round freeze time. |
CSRoundState.ACTIVE |
Active round. |
CSRoundState.ENDING |
Round-ending phase. |
CSRoundState.ENDOFMATCH |
End-of-match phase. |
Counter-Strike inventory slots:
| Property | Meaning |
|---|---|
CSGearSlot.INVALID |
Invalid or unassigned slot. |
CSGearSlot.PRIMARY |
Primary weapon. |
CSGearSlot.SECONDARY |
Secondary weapon. |
CSGearSlot.KNIFE |
Knife or melee weapon. |
CSGearSlot.GRENADES |
Grenades. |
CSGearSlot.C4 |
C4 bomb. |
CSGearSlot.BOOSTS |
Health-shot or boost item. |
Counter-Strike-specific damage behavior flags used by the CS damage event interfaces:
| Property | Meaning |
|---|---|
CSDamageFlags.NONE |
No Counter-Strike damage flags. |
CSDamageFlags.SUPPRESS_HEALTH_CHANGES |
Prevent health changes. |
CSDamageFlags.SUPPRESS_PHYSICS_FORCE |
Prevent damage physics force. |
CSDamageFlags.SUPPRESS_EFFECTS |
Suppress damage effects. |
CSDamageFlags.PREVENT_DEATH |
Prevent this damage from killing the player. |
CSDamageFlags.FORCE_DEATH |
Force the damage to kill the player. |
CSDamageFlags.SUPPRESS_DAMAGE_MODIFICATION |
Prevent later damage modification. |
CSDamageFlags.IGNORE_ARMOR |
Apply damage without armor protection. |
CSDamageFlags is a bitmask. Combine flags with | and test them with &:
const flags = CSDamageFlags.IGNORE_ARMOR | CSDamageFlags.PREVENT_DEATH;
if ((flags & CSDamageFlags.IGNORE_ARMOR) !== 0) {
Instance.Msg("damage ignores armor");
}
The Counter-Strike enum objects are immutable. Their numeric values come from the active gamemode integration; scripts should use the named properties instead of hard-coded numbers.
CS API are gamemode-defined numbers.Instance.OnPlayerKill event are Source bitmask numbers, not CSDamageFlags.