Commands/Lua

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

CS2D Command CS2D Console Commands

CS2D Command mp_hud

Categories

Parameters

  • HUD Elements (0-127): display HUD elements?

Info

This server setting controls the visibility of certain HUD elements. The parameter must be the sum of the codes for all the HUD elements which are supposed to be visible. Use 0 if you want to hide all HUD elements which are controlled by this setting.

The codes are the following:
1 - Health
2 - Armor
4 - Time
8 - Ammo
16 - Money
32 - Icons (like buyzone, rescuezone etc)
64 - Kill Messages

The default value for this setting is
1+2+4+8+16+32+64 = 127, which means that all HUD elements are visible

Example:
You just want to display health (1) and ammo (8) and hide everything else:
1+8 = 9

Another Example:
Just make the time visible:
4

Note: The radar is a HUD element as well but it has its own command: mp_radar.

Attention: Some of these HUD elements are not displayed in all game modes. Time for example. This command can not be used to display HUD elements which are not required in a game mode. You can hide them but you can not force to display them.

Lua Hook Lua Hooks

Lua Command Lua Commands