/*==========================================================================================
AMX Round Count v0.0.1
Copyright © 2010 by Duna. All rights reserved.
Last Update: 29/11/2010
-*- Description -*-
At the beginning of each round, the plugin will display a message on the hud,
stating the number of round and along with the message, a sound.
There are 4 different sounds.
Enjoy!
===========================================================================================*/
#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[][] =
{
"rcount/prepare1",
"rcount/prepare2",
"rcount/prepare3",
"rcount/prepare4"
};
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(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
show_hudmessage(0,"^nKészülj fel a Csatára!^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("rcount/prepare1.wav")
precache_sound("rcount/prepare2.wav")
precache_sound("rcount/prepare3.wav")
precache_sound("rcount/prepare4.wav")
return PLUGIN_CONTINUE
}
/*==========================================================================================
the end ...
===========================================================================================*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1046{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/