[HELP] command
#3

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.
Reply


Messages In This Thread
[HELP] command - by Luca12 - 31.12.2014, 16:44
Respuesta: [HELP] command - by Cerealguy - 31.12.2014, 19:17
Re: [HELP] command - by CalvinC - 31.12.2014, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)