Code: Select all
#include <amxmodx> new g_Restartas = 0new g_SVRestartnew g_HudSync public plugin_init(){ new const VERSION[ ] = "1.0" register_plugin("DeathRun RoundRR", VERSION, "me") g_SVRestart = get_cvar_pointer( "sv_restart" ); g_HudSync = CreateHudSyncObj(); set_task(8.0, "Check", _, _, _, "b")} public Check(){ if(g_Restartas == 0) { set_hudmessage(0, 85, 255, -1.0, 0.35, 0, 6.0, 8.0); ShowSyncHudMsg(0, g_HudSync, "At least 3 players required to start a game!"); if(get_playersnum() >= 3) { client_print(0, print_chat, "* Restarting the game!") set_pcvar_num(g_SVRestart, 1); g_Restartas = 1 } }} public client_disconnect(){ if(get_playersnum() <= 2) { g_Restartas = 0 }}