Kod php:
#include <amxmodx>
#define PLUGIN "Rounds Left"
#define VERSION "1.0"
#define AUTHOR "Kimi"
new g_roundnum;
new gRoundsNum;
new roundLeft;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("SendAudio", "roundend", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
register_event("HLTV", "EventNewRound", "a", "1=0", "2=0");
register_event("TextMsg", "EventRestartAttempt", "a", "2=#Game_will_restart_in");
register_clcmd("say timeleft", "displayrounds", ADMIN_ALL, "")
register_clcmd("say_team timeleft", "displayrounds", ADMIN_ALL, "")
register_clcmd("say /timeleft", "displayrounds", ADMIN_ALL, "")
register_clcmd("say_team /timeleft", "displayrounds", ADMIN_ALL, "")
register_clcmd("say /roundsleft", "displayrounds", ADMIN_ALL, "")
}
public roundend()
{
++g_roundnum
}
public EventNewRound()
{
gRoundsNum += 1;
}
public displayrounds(id)
{
new g_roundnum;
g_roundnum = get_cvar_num("mp_maxrounds")
roundLeft = g_roundnum -= gRoundsNum;
//client_print(id, print_chat,"[NPG]: %i rundi preostalo.",roundLeft)
// ^x04 == green
// ^x03 == team color
new text[100]
format(text,99,"^x04 [NPG]: %i rundi preostalo.",roundLeft) //green
// format(text,99,"^x03 [NPG]: %i rundi preostalo.",roundLeft) // team color
print_message(id,text)
}
public EventRestartAttempt()
{
gRoundsNum = 0;
roundLeft = g_roundnum;
}
print_message(id, msg[]) {
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
Tylko spolszczyć musisz. Inna wersja w ząłączniku.