#include <amxmodx>
#include <amxmisc>
new const PLUGIN [] = "AMX Round Count"
new const VERSION [] = "0.0.1"
new const AUTHOR [] = "Duna"
new g_roundCount
public plugin_init(){
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("RoundTime", "roundcount", "bc")
register_event("TextMsg","reset_counter","a","2&#Game_C","2&#Game_w")
return PLUGIN_CONTINUE
}
new prepare_sounds[][] =
{
"ICor3_kezdohangok/prepareone",
"ICor3_kezdohangok/preparetwo",
"ICor3_kezdohangok/preparethree",
"ICor3_kezdohangok/preparefour",
"ICor3_kezdohangok/preparefive",
};
public roundcount()
if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
++g_roundCount
new r = random(256)
new g = random(256)
new b = random(256)
set_hudmessage(random(256), random(256), random(256), -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(0,"^nKĂ©szĂĽlj Fel a Harcra!^n%d FordulĂł", g_roundCount)
client_cmd(0,"spk %s",prepare_sounds[random(sizeof prepare_sounds)]);
}
public reset_counter(){
g_roundCount = 0
}
public plugin_precache(){
precache_sound(ICor3_kezdohangok/prepareone.wav")
precache_sound(ICor3_kezdohangok/preparetwo.wav")
precache_sound(ICor3_kezdohangok/preparethree.wav")
precache_sound(ICor3_kezdohangok/preparefour.wav")
precache_sound(ICor3_kezdohangok/preparefive.wav")
return PLUGIN_CONTINUE
}