Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Timeleft In Hostname

Featured Replies

  • Administrator

Shows the time left in the server name so it appears in the server list and on the scoreboard.

Timeleft In Hostname 1.0.0 (olds.ro)

Adds the time left on the map to the server name, so the server browser and the server list show it before anyone joins, for example:

My Server | 15 min

    My Server | 45 sec        (last minute)

The plain server name is read from the hostname cvar when the map starts. If an admin or another plugin changes hostname later, that new name becomes the plain name and the time is added to it again. When the map ends, and while mp_timelimit is 0, the plain name is put back without any time part, so the server never shows "0 min".

Requirements

  • AMX Mod X 1.10 (no extra modules, no ReAPI)
  • Tested on AMX Mod X 1.10.0.5490, ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814

Install

  • Compile scripting/olds_timeleft_name.sma with amxxpc 1.10 and copy olds_timeleft_name.amxx to addons/amxmodx/plugins/.
  • Copy configs/plugins/olds_timeleft_name.cfg to addons/amxmodx/configs/plugins/ (if you skip this, the plugin writes the same file with the defaults on its first start).
  • Add olds_timeleft_name.amxx to addons/amxmodx/configs/plugins.ini.

How it works

  • The name is updated every olds_tlhn_interval seconds, and at once when hostname, mp_timelimit or one of the plugin's cvars changes.
  • Minutes are rounded up: with 14:30 left the name says 15 min.
  • In the last minute (olds_tlhn_lastmin 1) the name changes every 5 seconds and uses olds_tlhn_fmt_last.
  • A server name holds at most 63 bytes. If the result is longer, the plain name is shortened first so the time stays visible, and the cut never splits a UTF-8 character (names with diacritics stay readable).

Settings (addons/amxmodx/configs/plugins/olds_timeleft_name.cfg)

  olds_tlhn_interval 30                       seconds between updates (5 - 300)
  olds_tlhn_fmt      "%base% | %left% min"    name while more than a minute is left
  olds_tlhn_lastmin  1                        1 = faster updates and the format below
                                              in the last minute
  olds_tlhn_fmt_last "%base% | %secs% sec"    name in the last minute
  Placeholders: %base% plain server name, %left% minutes left, %secs% seconds left.

Commands None.

No sounds, models, sprites or language files are needed: the plugin shows no text to players, only the server name.

Credits and licence Written from scratch by alexit (olds.ro workshop) for workshop card LIB-1996. Licence: GPL-3.0-or-later.

Install

Download the ZIP above and copy its folders into cstrike/. Compile the .sma in addons/amxmodx/scripting with the AMX Mod X 1.10 compiler, put the .amxx in addons/amxmodx/plugins, and add it to plugins.ini.

Files: addons/amxmodx/scripting/olds_timeleft_name.sma

License: GPL-3.0-or-later.
Written for the olds.ro plugin workshop (LIB-1996), by alexit, reviewed by alexit and checked by the automated Claude review.

Timeleft In Hostname
v1.0.0Counter-Strike 1.6PluginTests passed
AMX Mod X 1.10Server engine HLDS, ReHLDSNeeds ReAPI NoMetamod Metamod-R0 downloads5.2 KBUpdated 12 hours ago
Sign in to download
Pawn (AMX Mod X) · 313 lines
/*
 * Timeleft In Hostname (olds.ro workshop card LIB-1996)
 *
 * Adds the time left on the map to the server name, so the server list
 * shows it before anyone joins, for example "My Server | 15 min".
 *
 * The plain server name (the "base") is read from the hostname cvar when the
Show all 313 lines

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.