/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new spr_current[33] = {0,...}
new time_show_set[33] = {0,...}
new iconstatus
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
register_event("RoundTime", "eNewRound", "bc")
register_forward(FM_PlayerPreThink,"check_spr")
iconstatus = get_user_msgid("StatusIcon")
}
public eEndRound(id, idspr)
{
new sec_c = get_systime()
time_show_set[id] = sec_c
hide_spr(id,spr_current[id])
spr_current[id] = idspr
new spr_name[33]
if (idspr==1) spr_name = "Round_1"
if (idspr==2) spr_name = "Round_2"
if(!(pev(id,pev_button) & FL_ONGROUND))
{
message_begin(MSG_ONE,iconstatus,{0,0,0},id)
write_byte(1)
write_string(spr_name)
message_end()
}
return PLUGIN_CONTINUE
}
public eNewRound(id,idspr)
{
new spr_name[33]
if (idspr==1) spr_name = "Round_1"
if (idspr==2) spr_name = "Round_2"
if(!(pev(id,pev_button) & FL_ONGROUND))
{
message_begin(MSG_ONE,iconstatus,{0,0,0},id)
write_byte(0)
write_string(spr_name)
message_end()
}
return PLUGIN_CONTINUE
}