Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSS[ALL] Server uptime


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
This plugin lets you keep track of your server's uptime by saving the start time on a server-only CVAR and providing easy-to-use client and server commands.

Screenshots
Getting the uptime from the client by saying /uptime
68747470733a2f2f692e6962622e636f2f704c63

Resetting the uptime as an administrator with the "l" flag (ADMIN_RCON) from the client
68747470733a2f2f692e6962622e636f2f42744c
68747470733a2f2f692e6962622e636f2f383953
68747470733a2f2f692e6962622e636f2f35786e

Dependencies
  • AMX Mod X version 1.8.2 or greater

Commands

Client
  • say /uptime - reports the server uptime to the player console and its chat
  • say /resetuptime - resets the server uptime back to the current time*
  • amx_uptime - reports the server uptime to the player console and its chat
  • amx_uptime_reset - resets the server uptime back to the current time*

Console
  • amx_uptime - posts the server uptime to the internal console
  • amx_uptime_raw - posts the server uptime to the internal console as a raw epoch timestamp
  • amx_uptime_reset - resets the server uptime back to the current time*

* All variants of the uptime reset commands do have a second check that you should be aware of, please refer to the CVARs below for more information.

CVARs
  • server_start_time - keeps track of the server start timestamp which is used to calculate the uptime upon request, this CVAR is protected from client-side changes and shouldn't be manipulated manually.
  • reset_uptime_enable - an administrator of the server console or an administrator with a client whose flags allow it to use the amx_rcon command must set this CVAR to "true" in order to authorize itself or any other administrator to execute any of the variants of the uptime reset commands. Once the uptime is reset, this CVAR will get back to "false".

Installation
  • Drop the plugin inside of your addons/amxmodx/plugins folder
  • Edit your plugins.ini (inside of addons/amxmodx/configs) and add its filename (amx_uptime.amxx)
  • Restart your server or change the level to initialize it

Development

On its current stage, the plugin is completely stable and usable. If you're planning on contributing, passing "debug" next to the filename within plugins.ini will provide you most of the unhandled exceptions that might occur.

Contributions

If you liked the plugin or you feel like there's anything to improve on or optimize, feel free to provide your suggestions or, better yet, submit a pull request to the repo at GitHub.

Credits

Attached Files
File Type: sma Get Plugin or Get Source (amx_uptime.sma - 7.0 KB)

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...