Commands/Lua
Reference for console commands, Lua hooks and Lua commands in CS2D.
- Console Commands are entered in console, executed with key-binds, cfg-files or with Lua parse
- Lua Hooks execute Lua when events occur - some have a return value which can change the game behavior
- Lua Commands are used to retrieve game data or to perform actions in Lua scripts
CS2D Console Commands
Category: settings (164)
- ah
- autoscreen
- autoswitch
- bot_autofill
- bot_count
- bot_freeze
- bot_jointeam
- bot_keepfreeslots
- bot_prefix
- bot_skill
- bot_weapons
- bullets
- changelevel
- changemap
- clientport
- deathnoticeimg
- debug
- debugai
- debuglog
- debuglua
- dmgindicator
- download
- drawradar
- fowalpha
- fowdetails
- gore
- grenademode
- hud_fastswitch
- hud_takesshots
- itemshadows
- lefthand
- localport
- map
- mapshadows
- mapsounds
- markplayer
- menu_lanscanport
- mp_antispeeder
- mp_autogamemode
- mp_autoteambalance
- mp_building_health
- mp_building_limit
- mp_building_price
- mp_buymenu
- mp_buytime
- mp_c4timer
- mp_connectionlimit
- mp_curtailedexplosions
- mp_damagefactor
- mp_deathdrop
- mp_dispenser_health
- mp_dispenser_money
- mp_dmspawnmoney
- mp_dropgrenades
- mp_flashlight
- mp_floodprot
- mp_floodprotignoretime
- mp_freezetime
- mp_grenaderebuy
- mp_hostagepenalty
- mp_hovertext
- mp_hud
- mp_hudscale
- mp_idleaction
- mp_idlekick
- mp_idletime
- mp_infammo
- mp_kevlar
- mp_kickpercent
- mp_killbuildingmoney
- mp_killbuildings
- mp_killinfo
- mp_killteambuildings
- mp_lagcompensation
- mp_lagcompensationdivisor
- mp_localrconoutput
- mp_luamap
- mp_luaserver
- mp_mapgoalscore
- mp_mapvoteratio
- mp_maxclientsip
- mp_maxrconfails
- mp_natholepunching
- mp_pinglimit
- mp_postspawn
- mp_radar
- mp_randomspawn
- mp_recoil
- mp_reservations
- mp_respawndelay
- mp_roundlimit
- mp_roundtime
- mp_shotweakening
- mp_smokeblock
- mp_startmoney
- mp_supply_items
- mp_teamkillpenalty
- mp_teleportreload
- mp_tempbantime
- mp_timelimit
- mp_tkpunish
- mp_trace
- mp_turretdamage
- mp_unbuildable
- mp_unbuyable
- mp_vulnerablehostages
- mp_weaponfadeout
- mp_winlimit
- mp_wpndmg
- mp_wpndmg_z1
- mp_wpndmg_z2
- mp_zombiedmg
- mp_zombiekillequip
- mp_zombiekillscore
- mp_zombierecover
- mp_zombiespeedmod
- name
- nick
- particles
- playershadows
- recoil
- relativemovement
- render3d
- renderdecals
- renderdecoration
- shadows
- shadowshade_obstacle
- shadowshade_wall
- shadowz_obstacles
- shadowz_wall
- shadow_angle
- shadow_frameskipping
- sounddriver
- soundmode
- spraycolor
- spraylogo
- sv_checkusgnlogin
- sv_daylighttime
- sv_forcelight
- sv_fow
- sv_friendlyfire
- sv_gamemode
- sv_gm
- sv_hostport
- sv_lan
- sv_map
- sv_maptransfer
- sv_maxplayers
- sv_name
- sv_offscreendamage
- sv_password
- sv_rcon
- sv_rconusers
- sv_specmode
- sv_spraytransfer
- sv_usgnonly
- tileanimations
- transfer_speed
- usgn_pw
- usgn_user
- visibleshots
- volume
- wiggle
- win
mp_luamapCategories
Parameters
- use (0/1): use Lua map script if available or not
Info
High Security Relevance
This setting is important for the security of your server!
Use it carefully! Wrong settings may make your server vulnerable or limit its functionality or accessibility!
Each map can have its own Lua script (also called "map script") which is saved as maps/MAPNAME.lua. A script for the map de_dust (maps/de_dust.map) 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 expression. This expression will not be evaluated if mp_luamap is 0. In this case trigger_if will do nothing (it will neither run the Lua script nor run its triggers).
Note: Changes to this setting do NOT affect the currently loaded map. So if the map Lua script for the current map is (not) loaded, it won't be (un-)loaded by changing this setting. You have to load the map again AFTER changing this setting to (un-)load the map Lua script.
Attention: Setting mp_luamap to 1 is a security risk because CS2D can execute downloaded map scripts which may contain malicious scripts! This can only happen when you host your own server (dedicated or "New Game" option) with downloaded maps.
Lua Hooks
Lua Commands
Categories
Parameters
- use (0/1): use Lua map script if available or not
Info
High Security Relevance
This setting is important for the security of your server!
Use it carefully! Wrong settings may make your server vulnerable or limit its functionality or accessibility!
This setting is important for the security of your server!
Use it carefully! Wrong settings may make your server vulnerable or limit its functionality or accessibility!
Each map can have its own Lua script (also called "map script") which is saved as maps/MAPNAME.lua. A script for the map de_dust (maps/de_dust.map) 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 expression. This expression will not be evaluated if mp_luamap is 0. In this case trigger_if will do nothing (it will neither run the Lua script nor run its triggers).
Note: Changes to this setting do NOT affect the currently loaded map. So if the map Lua script for the current map is (not) loaded, it won't be (un-)loaded by changing this setting. You have to load the map again AFTER changing this setting to (un-)load the map Lua script.
Attention: Setting mp_luamap to 1 is a security risk because CS2D can execute downloaded map scripts which may contain malicious scripts! This can only happen when you host your own server (dedicated or "New Game" option) with downloaded maps.