Accumulates connected time per SteamID in nVault, shows /time and /toptime, and exposes a csb_get_playtime() native.
Daemon666
1.0.0 - Initial release.
| csb_playtime_tracker.sma main | c6fa627 | 4.7 KB |
README.md
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 /timeandsay /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
- Enable the
nvaultmodule inaddons/amxmodx/configs/modules.ini. - Compile
csb_playtime_tracker.sma, copy it toaddons/amxmodx/plugins/and add it toplugins.ini. Load it before any plugin that calls its native. - Change the map. The vault file
csb_playtime.vaultappears inaddons/amxmodx/data/vault/.
Kurulum
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
Komutlar
| Command | Access | Description |
|---|---|---|
say /time |
|
Show your total playtime on this server. |
say /toptime |
|
Show a playtime ladder of the online players. |
Değişiklik günlüğü — v1.0.0
1.0.0 - Initial release.Sürümler →
Puan
No ratings yet.
Download v1.0.0
Gereksinimler
| AMX Mod X | ≥ 1.9 |
| Engine | ReHLDS HLDS |
| ReGameDLL | İsteğe bağlı |
| ReAPI | İsteğe bağlı |
| Metamod | Metamod / Metamod-r |
| Modüller | nvault |
Katkıda bulunanlar









