mp_maxrounds 30
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
new SayText;
new a_runda;
new b_runda;
new c_runda;
public plugin_init()
{
register_plugin("Round_Left", "1.1", "MaKeL")
SayText = get_user_msgid("SayText");
c_runda = get_cvar_num("mp_maxrounds")
register_clcmd("say timeleft","Set_timeleft")
register_clcmd("say roundleft","Set_timeleft")
register_event("HLTV", "NewRound", "a", "1=0", "2=0")
}
public NewRound()
{
a_runda++
}
public Set_timeleft(id)
{
b_runda = c_runda - a_runda
if(b_runda > 4)
{
print_green(id,"[AWp_india] Pozostalo %d rund do konca", b_runda)
}
if(b_runda == 4 ||b_runda == 3)
{
print_green(id,"[Awp_india] Pozostalo %d rundy do konca", b_runda)
}
if(b_runda == 2)
{
print_green(id,"[Awp_india] Uwaga !!! przedostatnia runda")
}
if(b_runda == 1)
{
print_green(id,"[Awp_india] Uwaga !!! Ostatnia runda")
}
}
stock print_green(id,const fmt[],{Float,_}:...) { //this is my stock btw <img src='http://img.amxx.pl/public/style_emoticons/<#EMO_DIR#>/naughty.gif' class='bbc_emoticon' alt='^^' />
if(id && !is_user_connected(id)) return 0
static buffer[192]
buffer[0] = '^x04'
vformat(buffer[1],190, fmt,3)
message_begin(id ? MSG_ONE : MSG_ALL,SayText,{0,0,0},id)
write_byte(id)
write_string(buffer)
message_end()
return 1
}