Commands/Lua

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

CS2D Command CS2D Console Commands

Category: server (201)

CS2D Command strip

Categories

Parameters

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

Info

Remove a weapon from a player (as server only). The weapon can be specified using its ID or its name.
The name can be the displayed name or a simplified version (lowercase without whitespaces/special characters, just letters and numbers)

Weapon and item IDs:
items

Usage examples (stripping from player 1 here, which is always you when using "New Game"):
strip 1 51 // ID
strip 1 "Molotov Cocktail" // full name
strip 1 ak47 // simplified name
strip 1 fiveseven // simplified name


Note: When you try to strip any armor type (even one the player does not have) the armor is just set to 0 / any special armor is removed (equal to: setarmor ID 0)!

Attention: When you want to strip the knife (id 50), you should switch to another weapon first using setweapon. Otherwise stripping might fail!

Attention: You cannot remove all weapons! The player always has to have at least one weapon. The game will automatically equip the standard melee weapon (knife with id 50 in most game modes) if there is no weapon left! Do not try to strip all weapons. Its an invalid game state that might lead to problems!

Lua Hook Lua Hooks

Lua Command Lua Commands