alright, my mistake for that link, here is the code:
Code:
#include <amxmodx>
#include <amxmisc>
new g_msgTeamScore
new g_iScore[ 2 ] //0 = tr, 1 = ct
public plugin_init()
{
register_plugin( "swap scores", "1.0", "swapper" )
g_msgTeamScore = get_user_msgid("TeamScore")
register_event( "SendAudio", "trWin", "a", "2&%!MRAD_terwin" ) //count tr wins
register_event( "SendAudio", "ctWin", "a", "2&%!MRAD_ctwin" ) //count ct wins
register_event("HLTV", "event_new_round", "a", "1=0", "2=0") //count rounds overall
}
public trWin() g_iScore[ 0 ]++
public ctWin() g_iScore[ 1 ]++
public event_new_round()
{
if( g_iScore[ 0 ] + g_iScore[ 1 ] == 15 )
set_task( 0.2, "swap_scoreboard" )
}
public swap_scoreboard()
{
message_begin( MSG_ALL, g_msgTeamScore )
write_string( "TERRORIST" )
write_short( g_iScore[ 1 ] ) //change TR score to CT from before
message_end()
message_begin( MSG_ALL, g_msgTeamScore )
write_string( "CT" )
write_short( g_iScore[ 0 ] ) //change ct score to previously-TR
message_end()
}
its without orpehu/reapi, thanks to E1_531G (
https://forums.alliedmods.net/showthread.php?t=315161)
my code is more like a example , im not sure if it will work very well, so you must change some parts a little...especially with 'if( g_iScore[ 0 ] + g_iScore[ 1 ] == 15 )', test with different numbers
__________________