Lua hooks (Counter-Strike 2D)

From Unreal Software English Wiki
(Difference between revisions)
Jump to: navigation, search
(Add move hook)
(put into CS2D Category)
 
Line 1: Line 1:
 +
[[Category:CS2D]]
 
This page lists all available Lua hooks in Counter-Strike 2D. For a more up-to-date version made by DC, refer to http://www.cs2d.com/help.php?hookcat=all
 
This page lists all available Lua hooks in Counter-Strike 2D. For a more up-to-date version made by DC, refer to http://www.cs2d.com/help.php?hookcat=all
  

Latest revision as of 14:15, 15 November 2017

This page lists all available Lua hooks in Counter-Strike 2D. For a more up-to-date version made by DC, refer to http://www.cs2d.com/help.php?hookcat=all

NOTE: This page is incomplete!

Contents

Basic

break

break is fired once a breakable entity is destroyed.

Syntax: x, y, playerID

x, y - breakable entity position in tiles

playerID - ID of player who destroyed the breakable or 0 if it was not broken by a player

Return: none


endround

endround is executed on round end

Syntax: mode

mode - specifies the type of a round end

Possible mode values:


log

log is executed when a text line has to be logged (console, log file).

Syntax: text

text - text to be written to log

Return:


mapchange

mapchange is fired when server changes the map.

Syntax: newmap

newmap - name of the new map that will be loaded

Return: none


parse

parse is fired once the server parses a server-side console command.

Syntax: text

text - text to be parsed and interpreted as a command

Return:


Player

move

move is called everytime a player moves. Called at most once a frame.

Syntax: id, x, y, walking

id (number) - player ID

x, y (number) - new player position on map in pixels

walking (number) - was the player walking (holding SHIFT)? 0 = running, 1 = walking

Return: none

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox