2v2 Duels.
#10

I do not know what might confuse you as it is easy. If you got a variable which registers the death of the player, then it can be easily done. One example is:

PHP Code:
new IsDead[MAX_PLAYERS] = 0;

public 
OnPlayerConnect(playerid)
{
     
IsDead[playerid] = 0;
     return 
1;
}

public 
OnPlayerDeath(playeridkilleridreason)
{
     
IsDead[playerid] = 1;
     return 
1;
}

public 
OnPlayerSpawn(playerid)
{
     if(
IsDead[playerid] == 1)
     {
          
//Make him observe the duel
     
}
     else
     {
          
// spawn him so he may fight
     
}
     return 
1;

And in the function which gets called when the round ends, you should add IsDead[playerid] = 0; so he may be spawned normally the next time he tries to spawn.
Reply


Messages In This Thread
2v2 Duels. - by iLearner - 10.01.2017, 12:54
Re: 2v2 Duels. - by coool - 10.01.2017, 13:02
Re: 2v2 Duels. - by Manyula - 10.01.2017, 13:30
Re: 2v2 Duels. - by iLearner - 10.01.2017, 13:33
Re: 2v2 Duels. - by Manyula - 10.01.2017, 13:45
Re: 2v2 Duels. - by oMa37 - 10.01.2017, 14:50
Re: 2v2 Duels. - by coool - 10.01.2017, 15:10
Re: 2v2 Duels. - by iLearner - 10.01.2017, 15:12
Re: 2v2 Duels. - by iLearner - 10.01.2017, 18:17
Re: 2v2 Duels. - by Private200 - 10.01.2017, 18:49
Re: 2v2 Duels. - by iLearner - 10.01.2017, 19:43
Re: 2v2 Duels. - by Private200 - 10.01.2017, 19:59

Forum Jump:


Users browsing this thread: 2 Guest(s)