View Single Post
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Rajasthan, India
Old 12-04-2019 , 02:36   Re: Check for winning team
Reply With Quote #13

PHP Code:
if(ScoreFtrstTeam >= 16)
        {
            
//Change description of the game.
            
            
new GameDescBuffer[32]
            
formatex(GameDescBuffer,charsmax(GameDescBuffer),"GG! %d To %d",ScoreFtrstTeam,ScoreScondteam)

            
// set_task(8.0,"StartSongForAll")
            
new players[32], num
            
if(!isSecondHalfStarted)
                
FirstCaptainTeamName == get_players(playersnum"ae""TERRORIST") : get_players(playersnum"ae""CT")

            else
                
FirstCaptainTeamName == get_players(playersnum"ae""CT") : get_players(playersnum"ae""TERRORIST"//  coz Teams are now swapped 

            
for(new i=0numi++)
                
client_print(i3"You are winning!")

            
set_cvar_string("amx_warname",GameDescBuffer)
            
            
server_cmd("mp_freezetime 99999");
            
set_task(7.0,"FirstTeamWinnerMessage")
            
        }

        if(
ScoreScondteam >= 16)
        {   

            new 
GameDescBuffer[32]
            
formatex(GameDescBuffer,charsmax(GameDescBuffer),"GG! %d To %d",ScoreScondteam,ScoreFtrstTeam)
            
set_cvar_string("amx_warname",GameDescBuffer)

            new 
players[32], num
            
if(!isSecondHalfStarted)
                
FirstCaptainTeamName == get_players(playersnum"ae""CT") : get_players(playersnum"ae""TERRORIST")

            else
                
FirstCaptainTeamName == get_players(playersnum"ae""TERRORIST") : get_players(playersnum"ae""CT"//  coz Teams are now swapped 

            
for(new i=0numi++)
                
client_print(i3"You are winning!")

            
            
server_cmd("mp_freezetime 99999");
            
set_task(7.0,"SecondTeamWinnerMessage"
        } 
__________________
CSIndia The only Indian Scripters Community
instinctpt1 is offline