06.06.2012, 17:19
1) Use 'i' instead of 'playerid' in 'AdminLevel'
2) You don't need to format the string every time, only once and then send it to all admins
2) You don't need to format the string every time, only once and then send it to all admins
pawn Код:
format(strOut,sizeof(strOut),"Adminchat: %s: {FFFFFF}%s",PlayerInfo[playerid][Username],text);
for(new i = 0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerData[i][AdminLevel] < 1) continue;
SendClientMessage(i,color_yellow,strOut);
}