how do you mean i got 2 codes for you
one is only admin ( noly admin can see it )
if you copy on of this commands
here are the color's
pawn Код:
#define COLOR_PURPLE 0x58f205ff
#define COLOR_BLUE 0x00dbffff
pawn Код:
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_BLUE, "USAGE: (/a)dmin [admin chat]");
return 1;
}
format(string, sizeof(string), "*Admin %s:[%d] %s", sendername, playerid, result);
if (PlayerInfo[playerid][pAdmin] > 100)
{
SendAdminMessage(COLOR_BLUE, string);
}
printf("Admin %s:[%d] %s", sendername, playerid, result);
return 1;
}
everybody can see this
pawn Код:
if(strcmp(cmd, "/amess", true) == 0 && IsPlayerConnected(playerid) || strcmp(cmd, "/am", true) == 0 && IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_PURPLE, "USAGE: /am [message]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 102)
{
format(string, sizeof(string), "** Admin %s:[%d] %s **", sendername, playerid, result);
SendClientMessageToAll(COLOR_BLUE, string);
printf("** Admin: %s:[%d] %s **", sendername, playerid, result);
}
else
{
SendClientMessage(playerid, COLOR_PURPLE, " You are Not Authorized to use that command.");
return 1;
}
}