CSB Playtime Tracker

v1.0.0 0 téléchargements Daemon666 Dernière mise à jour: Jul 15, 2026

Accumulates connected time per SteamID in nVault, shows /time and /toptime, and exposes a csb_get_playtime() native.

CSB Playtime Tracker counts how long each SteamID has spent on your server. Time is accumulated in seconds, flushed to nVault once a minute and again on disconnect, so a crash loses at most 60 seconds. say /time shows a player their total hours and minutes; say /toptime shows a small ladder of the online players by time played.

The plugin also registers a native, csb_get_playtime(id), that returns a player's live total in seconds — VIP, rewards or rank plugins can call it to unlock perks after so many hours.

Features

  • Per-SteamID second-accurate accumulation, persisted in nVault.
  • One-minute periodic flush plus flush on disconnect and on map end.
  • say /time and say /toptime (top 5 of the online players).
  • csb_get_playtime(id) native for other plugins.

Using the native

native csb_get_playtime(id);
// hours = csb_get_playtime(id) / 3600;

Installation

  1. Enable the nvault module in addons/amxmodx/configs/modules.ini.
  2. Compile csb_playtime_tracker.sma, copy it to addons/amxmodx/plugins/ and add it to plugins.ini. Load it before any plugin that calls its native.
  3. Change the map. The vault file csb_playtime.vault appears in addons/amxmodx/data/vault/.

Installation

1. Enable the nvault module in addons/amxmodx/configs/modules.ini
2. Put csb_playtime_tracker.amxx in addons/amxmodx/plugins/ and add it to plugins.ini (before plugins that call csb_get_playtime)
3. Change map

Commandes

CommandAccessDescription
say /time Show your total playtime on this server.
say /toptime Show a playtime ladder of the online players.

Journal des modifications — v1.0.0

1.0.0 - Initial release.
Versions →
Contributeurs: Daemon666 ✦
Licence: GPL-3.0

Note

No ratings yet.

Download v1.0.0

Compiled live from the source below — nothing pre-built.
Télécharger .sma
Fichiers:
csb_playtime_tracker.sma main 4.7 KB

Prérequis

AMX Mod X ≥ 1.9
Engine ReHLDS HLDS
ReGameDLL Optionnel
ReAPI Optionnel
Metamod Metamod / Metamod-r
Modules nvault
Retour aux Plugins