Commands/Lua

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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Category: all (79)

Lua Hook vote

Categories

Parameters

  • id: player id
  • mode: vote mode (1 kick, 2 map)
  • param: player id or map

Info

When a player votes for something. Either to kick a player or to change to a specific map.

Mode can be:
  • 1 - Vote Kick (param = ID of voted player as string)

  • 2 - Vote Map (param = name of voted map)


You can return 1 if you want to ignore the vote. In that case the game behaves like the player never voted. This also means that the player can just vote again without having to wait for 15 seconds.

Return Values

  • 0: proceed normally
  • 1: ignore the vote and do nothing

Lua Command Lua Commands