Hey, why the hell my array doesn't set to 0 when someone joins a game and the game is starting.
here is my code:
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Plugin name"
#define VERSION "1.0"
#define AUTHOR "ADDiNOL"
new iRound = 0;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "ADDiNOL")
register_logevent("Event_HLTV_Round_End", 2, "1=Round_End")
register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_W");
register_event("TextMsg", "eRestart", "a", "2=#Game_will_restart_in")
register_clcmd("say /round", "CmdRound")
}
public eRestart()
{
iRound = 0;
}
public Event_HLTV_Round_End()
{
iRound+=1;
}
public CmdRound()
{
client_print(0, print_chat, "round: %d", iRound)
}
But if I use sv_restart 1 or sv_restartround 1, it works, and iRound is set to 0.