Commands/Lua

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 (86)

Lua Command closehostage

Categories

Parameters

  • playerid

Info

Returns the tile x and y position (2 values!) of the closest living and unused hostage to a given player. Returns -100,-100 if no hostage has been found.

Note: The returned position is in tiles, NOT in pixels!


Note: Returns 2 values, see example!


Sample 1: Getting the position of a hostage which is close to player 1
x,y=closehostage(1)