ive done it im a frigin genius, lol if anyone can over look and see if im missing something or can tidy up the code that would be good, i know im missing author info, but is that needed relay?
PHP Code:
#include < amxmodx >
#include < cstrike >
new CurrentRound;
new Rcount;
public plugin_init( )
{
register_concmd( "live", "ClientCommand_Live" );
//register_logevent( "LogEvent_RoundStart", 2, "1=Round_Start" );
register_logevent( "RoundEnd", 2, "1=Round_End" );
//register_event("HLTV", "round_start", "a", "1=0", "2=0")
Rcount = register_cvar( "amx_rcount", "15", ADMIN_BAN );
register_event( "SendAudio", "Event_SendAudio_TWin", "a", "2&%!MRAD_terwin" );
register_event( "SendAudio", "Event_SendAudio_CTWin", "a", "2&%!MRAD_ctwin" );
register_event("TextMsg","Reset_Counter","a","2&#Game_C","2&#Game_w")
state live;
CurrentRound = 0;
}
public ClientCommand_Live( Client )
{
server_cmd( "amx_rcount 15" );
CurrentRound = 0;
{
new Rcount = get_pcvar_num(Rcount)
}
}
public RoundEnd( ) <live>
{
CurrentRound++;
if( CurrentRound >= get_pcvar_num( Rcount ) )
{
server_cmd( "fmatch_enable 0" );
CurrentRound = 0;
}
}
public Reset_Counter( ) <live>
{
state live;
CurrentRound = 0;
}
public Event_SendAudio_TWin( ) <live>
{
}
public Event_SendAudio_CTWin( ) <live>
{
}