23.07.2013, 15:52
hello i have this admin chat but when only one admin is online i can see chat but when more admins online i cant see admin chat...
here are codes...
here are codes...
pawn Код:
dcmd_a(playerid, params[])
{
new chat[100];
if(pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE"");
if(sscanf(params, "s", chat)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /a [chat]");
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pInfo[i][Adminlevel] > 0)
{
new str[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,24);
format(str,sizeof(str),"[ADMIN CHAT] %s(%d): %s", playername, playerid, chat);
SCM(i, COLOR_HOTPINK, str);
print(str);
return 1;
}
}
}
return 1;
}