1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76. | #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,"[AMXX] Pozostalo %d rund do konca", b_runda)
}
if(b_runda == 4 ||b_runda == 3)
{
print_green(id,"[AMXX] Pozostalo %d rundy do konca", b_runda)
}
if(b_runda == 2)
{
print_green(id,"[AMXX] Uwaga !!! przedostatnia runda")
}
if(b_runda == 1)
{
print_green(id,"[AMXX] Uwaga !!! Ostatnia runda")
}
}
stock print_green(id,const fmt[],{Float,_}:...) { //this is my stock btw ^^
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
} |