29.11.2014, 09:00
Ok.. this is a bit weird, command works fine but only for the admin who have PLAYERID 0, like I have ID 1 and my friend have ID 0, he can see what he and I wrote(If he have ID 0) but I can't see his chat, nor mine..(If I have ID 1-9999)
pawn Код:
if(strcmp(cmdtext, "/adm ", true, 5) == 0)
{
if(adminlevel[playerid]==0) return SendClientMessage(playerid, COLOR_WHITE, "Server: Wrong command. Do /commands.");
if(!cmdtext[5]) return SendClientMessage(playerid, COLOR_ADMINBLUE, "Correct usage: /adm [message]");
for(new i=0; i<MAX_PLAYERS; i++)
{
new iadminlevel;
INI_ParseFile(UserPath(i), "LoadUser_%s", .bExtra = true, .extra = i);
iadminlevel= PlayerInfo[i][pAdmin];
new admmessage[128], playername[128];
GetPlayerName(playerid, playername, sizeof(playername));
format(admmessage, sizeof(admmessage), "(Admin Chat) %s: %s", playername, cmdtext[5]);
if(iadminlevel>0) return SendClientMessage(i, COLOR_RED, admmessage);
}
return 1;
}