10.01.2017, 18:49
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:
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.
PHP Code:
new IsDead[MAX_PLAYERS] = 0;
public OnPlayerConnect(playerid)
{
IsDead[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
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;
}