29.11.2014, 09:56
Try this:
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]");
new admmessage[128], playername[128];
GetPlayerName(playerid, playername, sizeof(playername));
format(admmessage, sizeof(admmessage), "(Admin Chat) %s: %s", playername, cmdtext[5]);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(adminlevel[i] >= 1)
{
SendClientMessage(i, COLOR_RED, admmessage);
}
}
}
return 1;
}