21.10.2011, 12:01
If I understand correctly, you want to make players only able to join a deathmatch once someone is in it. If so, here is the code.
Remember to add pcount --; once players leave the deathmatch.
pawn Код:
CMD:dm(playerid, params[])
{
new pcount;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) pcount ++;
}
if(!pcount) return SendClientMessage(playerid, 0xFFFFFFFF, "Not enough players to join");
else
{
//your join deathmatch code here
}
return 1;
}