Reference for console commands, Lua hooks and Lua commands in CS2D.

CS2D Command CS2D Console Commands

Category: all (370)

CS2D Command setweapon



  • player (1-32): id of a player
  • weapon (1-255): type id (int) or name (string) of a weapon


Set the active weapon a certain player holds in his hand (as server only).
The name can be the displayed name or a simplified version (lowercase without whitespaces/special characters, just letters and numbers)

Weapon and item IDs:

Usage examples (setting weapon of player 1 here, which is always you when using "New Game"):
setweapon 1 51 // ID

setweapon 1 "Molotov Cocktail" // full name

setweapon 1 ak47 // simplified name

setweapon 1 fiveseven // simplified name

Note: The player has to own this weapon already! Use equip first if the player does not have the weapon!

Note: Don't confuse this command with the weapon command! The weapon command can only be used locally by a client to change the weapon of the own player!

Lua Hook Lua Hooks

Lua Command Lua Commands