Commands/Lua

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

CS2D Command CS2D Console Commands

CS2D Command mp_luamap

Categories

Parameters

  • use (0/1): use Lua map script if available or not

Info

Each map can have its own Lua script (also called "map script") which is saved as maps/MAPNAME.lua. A script for de_dust would have to be saved as maps/de_dust.lua for example. By default (mp_luamap 0) CS2D does not load this script. You can enable automatic loading of map scripts by setting mp_luamap to 1.

Moreover this setting affects Lua scripts which are embedded in maps directly. This is currently only possible with the entity trigger_if which can have a boolean Lua expressions. These expressions will not be evaluated if mp_luamap is 0. In this case trigger_if will do nothing.

Attention: Setting mp_luamap to 1 might be a security risk because CS2D may execute downloaded map scripts which can contain malicious scripts!

Lua Hook Lua Hooks

Lua Command Lua Commands