Ends round with no one alive
#1

I am making a tdm script and I have the command where I use

/start and it will add both teams to the arena, and they can fight.

But how do I make it say, "BLUE TEAM WINS!" when they kill all the red team in the arena?


pawn Код:
if(!strcmp(cmdtext, "/start", true, 8))
    {
        if(isclanwarstarted == 0)
        {
            new string[128];
            format(string, sizeof(string), "** Prepare yourself, a round is about to start!");
            SendClientMessageToAll(COLOR_MESSAGE, string);
            SetTimer("startcw", 5000, false);
            isclanwarstarted = 1;
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: A round is currently running active!");
            PlayerPlaySound(playerid, 1053, 0.0, 0.0, 0.0);
        }
        return 1;
    }
Reply
#2

I would suggest adding an IF statement inside your OnPlayerDeath callback. Within this IF statement, you can check whether the player who died was the last alive on his team and respond accordingly if so.
Reply
#3

Ok, could you give me some code to help me do that?
Reply
#4

Why a new topic when you already made one? Looks like my last reply in your old topic didn't help ya, did it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)