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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Lua Command Lua Commands

Category: all (85)

Lua Command ai_findtarget



  • id


Returns the ID of the closest enemy to the player with the specified ID or 0 when no enemy was found. Only players which are close enough (inside the virtual screen of the player) will be returned. When fog of war is enabled players behind walls won't be returned.