command to hide admin prefix
#3

Example:
pawn Код:
new bool:pUndercover[MAX_PLAYERS] = false;

public OnPlayerText(playerid, text[])
{
    new string[256], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    if(PlayerInfo[playerid][pAdmin] == 1)
    {
        if(pUndercover[playerid] == true)
        {
            format(string, sizeof(string), "[Admin] %s: %s", name, text);
            SendClientMessageToAll(COLOR_WHITE, string);
        }
        else
        {
            format(string, sizeof(string), "%s: %s", name, text);
            SendClientMessageToAll(COLOR_WHITE, string);
        }
    }
    else
    {
        format(string, sizeof(string), "%s: %s", name, text);
        SendClientMessageToAll(COLOR_WHITE, string);
    }
    return 1;
}

CMD:hide(playerid, params[])
{
    if(pUndercover[playerid] == true) return SendClientMessage(playerid, -1, "You are already hidden!");
    pUndercover[playerid] = true;
}

CMD:unhide(playerid, params[])
{
    if(pUndercover[playerid] == false) return SendClientMessage(playerid, -1, "You aren't hidden!");
    pUndercover[playerid] = false;
}
Reply


Messages In This Thread
command to hide admin prefix - by pitchooo - 23.03.2015, 03:50
Re: command to hide admin prefix - by Nabster - 23.03.2015, 03:57
Re: command to hide admin prefix - by SickAttack - 23.03.2015, 04:57
Re: command to hide admin prefix - by pitchooo - 24.03.2015, 03:23

Forum Jump:


Users browsing this thread: 1 Guest(s)