14.10.2014, 20:24
You shouldn't be using return inside a loop because it will end the loop at the first player that isn't a drug dealer so if there is players after him that are drug dealers it will never get to them.
Try something like this:
Try something like this:
pawn Код:
new dealerCount = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pSkill] == SKILL_DRUGDEALER)
dealerCount++;
}
if(dealerCount == 0) return SendClientMessage(playerid,COLOR_RED, "Sorry! There are no drug dealers online at the moment.");