Commands/Lua

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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Lua Hook buy

Categories

Parameters

  • id: player id
  • weapon: type id of requested weapon

Info

Triggered whenever a player tries to buy something. You can either proceed and let the game decide if the item can be bought or you can cancel the process by returning the value 1.

Weapon and item type IDs:
items

Return Values

  • 0: proceed normally
  • 1: don't allow buying

Lua Command Lua Commands