Code:
public rotar()
{
for ( i = 1 ; i <= get_maxplayers (); i ++)
{
switch( cs_get_user_team ( i ))
{
case CS_TEAM_T : cs_set_user_team ( i , CS_TEAM_CT )
case CS_TEAM_CT : cs_set_user_team ( i , CS_TEAM_T )
}
}
return PLUGIN_HANDLED ;
}
Code:
public logevent_round_end ()
{
for ( i = 1 ; i <= get_maxplayers (); i ++)
{
switch( cs_get_user_team ( i ))
{
case CS_TEAM_T :
{
set_user_frags ( i , get_user_frags ( i ) + get_pcvar_num ( cvar_frag ))
ColorChat(0, NORMAL, "Terrorists Win 1 Frag for winning the round." )
}
case CS_TEAM_CT : ColorChat(0, NORMAL, "Counter-Terrorists Win the round, Change Teams!" ), rotar ()
}
}
}
PHP Code:
register_logevent ( "logevent_round_end" , 2 , "1=Round_End" )