/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new SyncHudObj
new g_round = 0
new g_SyncHud, g_Mode
new cvar_enable, cvar_central
new g_MaxClients
new const hud_tag[] = "Jelenlegi mod: "
new const mode_names[][] =
{
"Varakozas az uj modra...",
"Normal fertozeses",
"Nemesis mod",
"Tulelo mod",
"Raj mod",
"Tobbszoros fertozeses mod",
"Pestis mod",
"Ismeretlen mod"
}
new const rgb_hud_colors[sizeof(mode_names)][3] =
{
// R G B
{255, 255, 255}, // No mode Started
{0, 255, 0}, // Normal Infection, single round
{255, 0, 0}, // Nemesis Mode (zombie boss)
{0, 0, 255}, // Survivor Mode (human boss)
{255, 255, 0}, // Swarm round (no infections)
{0, 255, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
{255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
{255, 255, 255} // An unofficial mode (edited/created/modified by user)
}
const Float:START_TIME = 3.0
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
cvar_enable = register_cvar("zp_display_mode", "1")
register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
set_task(2.9, "hud", 0, _, _, "b")
g_SyncHud = CreateHudSyncObj()
if(cvar_exists("zp_on"))
cvar_central = get_cvar_pointer("zp_on")
if(!get_pcvar_num(cvar_central))
pause("a")
register_event("HLTV", "event_newround", "a", "1=0", "2=0");
}
public client_putinserver(id)
{
set_task(START_TIME, "mode_hud", id, _, _, "b")
}
public event_RoundStart()
{
g_Mode = 0
}
public mode_hud(id)
{
// If the Cvar isn't enabled
if(!get_pcvar_num(cvar_enable))
return;
// Hud Options
set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], 0.27, 0.0, 0, 6.0, 12.0)
// Now the hud appears
ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
}
public event_newround()
{
g_Mode = 0
g_round++
}
public zp_round_started(mode, id)
{
// Update var with Mode num
g_Mode = mode
// An unofficial mode
if(!(1 <= mode < (sizeof(mode_names) - 1)))
g_Mode = sizeof(mode_names) - 1
}
public hud()
{
new KoviMap[32], Ido[32], Playerek, id
new pnum, tempid, players[32]
get_players(players, pnum, "c")
for(id = 1; id <= g_MaxClients; id++)
if(!is_user_connected(id))
{
continue
}
else
{
Playerek++
}
for( new i; i<pnum; i++ )
{
tempid = players[i]
}
get_cvar_string("amx_nextmap", KoviMap, 31)
get_time("%H:%M:%S", Ido, 31)
set_hudmessage(random(250), random(250), random(250), 0.0, 0.14, 0, 6.0, 12.0)
ShowSyncHudMsg(tempid, SyncHudObj, "Jo Jatekot^nKovetkezo Palya:%s^nSlot:%s/%s^nKor:%i", KoviMap, Playerek, g_MaxClients, g_round)
}