I am trying to get the possibility of checking if EVERYONE is dead in a minigame, I wrote up my code and tested it, but when one person died, it announced the message saying that everyone died, is there any way to prevent this so that it only happens if EVERYONE dies?
for (%i = 0; %i < ClientGroup.getCount(); %i++)
{
if(ClientGroup.getObject(%i).RPData.value["dead"] == 1)
{
messageAll('', '\c4Everyone has died. Resetting minigame...');
ClientGroup.getObject(%i).corpse.delete();
ClientGroup.getObject(%i).player.delete();
ClientGroup.getObject(%i).RPData.clear();
%client.resetminigame();
}
}