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: server (201)
- banip
- banname
- bans
- bansteam
- banusgn
- bot_add
- bot_add_ct
- bot_add_t
- bot_autofill
- bot_count
- bot_freeze
- bot_jointeam
- bot_keepfreeslots
- bot_kill
- bot_prefix
- bot_remove
- bot_remove_all
- bot_remove_ct
- bot_remove_t
- bot_skill
- bot_weapons
- changelevel
- changemap
- cmsg
- customkill
- damageobject
- damagetile
- deathslap
- effect
- endround
- equip
- explosion
- flashplayer
- flashposition
- freeprojectile
- hudtxt
- hudtxt2
- hudtxtalphafade
- hudtxtclear
- hudtxtcolorfade
- hudtxtmove
- items
- kick
- killobject
- killplayer
- listbans
- listplayers
- logaddress_add
- logaddress_remove
- logaddress_removeall
- lua
- luareset
- makect
- makespec
- maket
- map
- maps
- 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_winlimit
- mp_wpndmg
- mp_wpndmg_z1
- mp_wpndmg_z2
- mp_zombiedmg
- mp_zombiekillequip
- mp_zombiekillscore
- mp_zombierecover
- mp_zombiespeedmod
- msg
- rcon
- rcon_password
- rcon_pw
- removeitem
- reroute
- restart
- restartround
- setammo
- setarmor
- setassists
- setdeaths
- sethealth
- setmaxhealth
- setmoney
- setmvp
- setname
- setpos
- setscore
- setteamscores
- settile
- setweapon
- shake
- slap
- spawnitem
- spawnnpc
- spawnobject
- spawnplayer
- spawnprojectile
- speedmod
- strip
- 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_msg
- sv_msg2
- sv_name
- sv_offscreendamage
- sv_password
- sv_rcon
- sv_rconusers
- sv_restart
- sv_restartround
- sv_sound
- sv_sound2
- sv_soundpos
- sv_specmode
- sv_spraytransfer
- sv_stopsound
- sv_usgnonly
- transfer_speed
- trigger
- triggerposition
- unban
- unbanall
- usgn_addserver
- usgn_info
mp_kevlarCategories
Parameters
- percent (0.0-1.0): percentage (0.0=0%, 1.0=100%) of damage which will be absorbed by kevlar
Info
Controls how much damaged is absorbed by kevlar vests.
The internal calculation depends on this setting, the damage value and the armor points you have left.
Possible values range from 0.0 to 1.0 with:
0.0 = no protection (0%)
1.0 = best protection (100%)
the default value is 0.3 (30% protection)
The internal damage calculation works like described below in pseudo code.
// AP = armor points of the hit player
// HP = health points of the hit player
// DMG = damage the player receives
// MAX(X,Y) = returns the bigger of both values
// MIN(X,Y) = returns the smaller of both values (used here to keep value always >= 0)
// Calculate shielded damage
SHIELDED = MIN(DMG, AP)
// Reduce AP by shielded damage
AP = MAX(AP - SHIELDED, 0)
// Reduce HP by percentage of shielded damage (controlled by mp_kevlar)
HP = MAX(HP - (SHIELDED * (1.0 - mp_kevlar)), 0)
// Reduce HP by remaining unshielded damage (full damage)
DMG = DMG - SHIELDED
HP = MAX(HP - DMG, 0)
Lua Hooks
Lua Commands
Categories
Parameters
- percent (0.0-1.0): percentage (0.0=0%, 1.0=100%) of damage which will be absorbed by kevlar
Info
Controls how much damaged is absorbed by kevlar vests.
The internal calculation depends on this setting, the damage value and the armor points you have left.
Possible values range from 0.0 to 1.0 with:
0.0 = no protection (0%)
1.0 = best protection (100%)
the default value is 0.3 (30% protection)
The internal damage calculation works like described below in pseudo code.
// AP = armor points of the hit player
// HP = health points of the hit player
// DMG = damage the player receives
// MAX(X,Y) = returns the bigger of both values
// MIN(X,Y) = returns the smaller of both values (used here to keep value always >= 0)
// Calculate shielded damage
SHIELDED = MIN(DMG, AP)
// Reduce AP by shielded damage
AP = MAX(AP - SHIELDED, 0)
// Reduce HP by percentage of shielded damage (controlled by mp_kevlar)
HP = MAX(HP - (SHIELDED * (1.0 - mp_kevlar)), 0)
// Reduce HP by remaining unshielded damage (full damage)
DMG = DMG - SHIELDED
HP = MAX(HP - DMG, 0)
The internal calculation depends on this setting, the damage value and the armor points you have left.
Possible values range from 0.0 to 1.0 with:
0.0 = no protection (0%)
1.0 = best protection (100%)
the default value is 0.3 (30% protection)
The internal damage calculation works like described below in pseudo code.
// AP = armor points of the hit player
// HP = health points of the hit player
// DMG = damage the player receives
// MAX(X,Y) = returns the bigger of both values
// MIN(X,Y) = returns the smaller of both values (used here to keep value always >= 0)
// Calculate shielded damage
SHIELDED = MIN(DMG, AP)
// Reduce AP by shielded damage
AP = MAX(AP - SHIELDED, 0)
// Reduce HP by percentage of shielded damage (controlled by mp_kevlar)
HP = MAX(HP - (SHIELDED * (1.0 - mp_kevlar)), 0)
// Reduce HP by remaining unshielded damage (full damage)
DMG = DMG - SHIELDED
HP = MAX(HP - DMG, 0)