Counter-Strike 2DGet it now!

Code Command Reference

You can enter CS2D script commands in the console, save them in cfg-files or bind them to keys. CS2D script commands are no Lua commands but they can still be executed in Lua scripts by using the Lua parse-function!

Commands


Category: server (179)

banip
banname
bans
banusgn
bot_add
bot_add_ct
bot_add_t
bot_count
bot_jointeam
bot_kill
bot_prefix
bot_remove
bot_remove_all
bot_remove_ct
bot_remove_t
bot_skill
bot_weapons
changelevel
changemap
cmsg
customkill
damageobject
deathslap
effect
endround
equip
explosion
flashplayer
flashposition
freeprojectile
hudtxt
hudtxt2
hudtxtalphafade
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_curtailedexplosions
mp_damagefactor
mp_deathdrop
mp_dispenser_health
mp_dispenser_money
mp_dmspawnmoney
mp_dropgrenades
mp_flashlight
mp_floodprot
mp_freezetime
mp_grenaderebuy
mp_hostagepenalty
mp_hud
mp_idleaction
mp_idlekick
mp_idletime
mp_infammo
mp_kevlar
mp_kickpercent
mp_killbuildingmoney
mp_killbuildings
mp_killinfo
mp_killteambuildings
mp_lagcompensation
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_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
setarmor
setdeaths
sethealth
setmaxhealth
setmoney
setname
setpos
setscore
setweapon
shake
slap
spawnitem
spawnnpc
spawnobject
spawnplayer
spawnprojectile
speedmod
strip
sv_checkusgnlogin
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_password
sv_rcon
sv_rconusers
sv_restart
sv_restartround
sv_sound
sv_sound2
sv_specmode
sv_spraytransfer
sv_usgnonly
transfer_speed
trigger
triggerposition
unban
unbanall
usgn_addserver
usgn_info

spawnnpc

Categories

server

Parameters

  • type (1-X): npc type
  • x (0-X): x pos in tiles
  • y (0-X): y pos in tiles
  • rot (0-360): rotation

Info

Create an NPC (as server only).

NPC types:
1 - zombie
2 - headcrab
3 - snark
4 - vortigaunt
5 - soldier

Note: NPCs are actually objects as well - with type 30. the type of the NPC is saved in the player attribute of the object. So you could also use spawnobject with proper parameters to create NPCs.
Attention: Huge numbers of NPCs can slow down the game and lead to lags!

Lua Lua Reference

Lua scripting (server-sided) allows server hosters and mappers to modify the game and to add new elements.