How to put an admin tag onto a chat if they are admin?
#5

pawn Код:
CMD:hc(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFAA, "/hc [Text]");
    new
        string[128],
        pName[MAX_PLAYER_NAME]
    ;
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "[Help Chat] Player %s: %s", pName, params);
    SendClientMessageToAll(COLOR_NEUTRALBLUE, string);
    else if(pInfo[playerid][Adminlevel] == 1)
    {
        format(string, sizeof(string), "[Help Chat] Mapper %s: %s", pName, params);
        SendClientMessageToAll(COLOR_NEUTRALBLUE, string);
    }
    else if(pInfo[playerid][Adminlevel] == 2)
    {
        format(string, sizeof(string), "[Help Chat] Lead Mapper %s: %s", pName, params);
        SendClientMessageToAll(COLOR_NEUTRALBLUE, string);
    }
    else if(pInfo[playerid][Adminlevel] == 3)
    {
        format(string, sizeof(string), "[Help Chat] Developer %s: %s", pName, params);
        SendClientMessageToAll(COLOR_NEUTRALBLUE, string);
    }
    else  if(pInfo[playerid][Adminlevel] == 4)
    {
        format(string, sizeof(string), "[Help Chat] Lead Developer %s: %s", pName, params);
        SendClientMessageToAll(COLOR_NEUTRALBLUE, string);
    }
    return 1;
}
now try this maybe will fix

if again problem errors come

then show only those lines which have errors
Reply


Messages In This Thread
How to put an admin tag onto a chat if they are admin? - by Jamcraftadam - 11.08.2013, 16:46
Re: How to put an admin tag onto a chat if they are admin? - by JeaSon - 11.08.2013, 16:54
Re: How to put an admin tag onto a chat if they are admin? - by Jamcraftadam - 11.08.2013, 17:00
Re: How to put an admin tag onto a chat if they are admin? - by JeaSon - 11.08.2013, 17:03
Re: How to put an admin tag onto a chat if they are admin? - by JeaSon - 11.08.2013, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)