Posts: 3,351
Threads: 780
Joined: Jan 2010
Quote:
Originally Posted by zDevon
Or, if you don't have foreach installed (which I would recommend that you do);
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][pAdmin]) { SendClientMessage(i, 0xC4C4C4FF, string); } }
|
Simple:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin]) return SendClientMessage(i, 0xC4C4C4FF, string);
}
But why you should use SendClientMessage in a loop? If you want send a message to ALL players, there is SendClientMessageToAll.