The code for ending a match.
#1

First can you just breifly tell me how i can do a Textdraw countdown for 5 Mins at the top left of the screen. Thanks

The main thing i need help with is ending the match. I need the match to end if all of one team is dead. I have made it so when someone dies they will be put into spectate mode. I now need to make it so when everyone on that team is dead it will freeze everyone and say match over (red/blue) team has won!

I will be grateful and +rep if you can help me out on this.

Thanks
Reply
#2

Check if all players are dead

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
j,klid;
    for(new 
i=0MAX_PLAYERSi++) // Loop through players (foreach Recommended)
    
{
        if(
cantspawn[i] == 0) {j++; klid=i;} // If someone is alive, increase j by 1; Save playerid in klid.
        
if(1) break; // If j is more than 1, break loop (for efficiency)
    
}
    
    if(
== 1// Check that there is only 1 player alive
    
{
        
// klid is the winner.
    
}
    return 
1;

I hope it helps
Reply
#3

nvm*
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)