First you can make an "if" to check if the admins level is above something, with "< (lvl)", and then make it format a string with red color.
Then an else if, to check the same, but with 1338, which formats another string with lightblue color instead.
Then an else, which will find if the player isn't any of these, and format a white message.
That's how i would do it atleast.
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[128], playername[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] < 2 && (PlayerInfo[playerid][pAdmin] !< 1338)) format(string, sizeof(string), "{FF0000}%s: %s", playername, text);
else if(PlayerInfo[playerid][pAdmin] < 1338) format(string, sizeof(string), "{00FFEE}%s: %s", playername, text);
else format(string, sizeof(string), "%s: %s", playername, params);
SendClientMessageToAll(0xFFFFFF, string);
return 0;
}
Haven't tested the above command, might need a little editing.
And replace "PlayerInfo[playerid][pAdmin]" with what you use.