help with /a command
#1

pawn Код:
CMD:a(playerid, params[])
{
    new result[128],name[MAX_PLAYER_NAME],string[128];
    if(sscanf(params, "s[128]", result)) return SendClientMessage(playerid, COLOR_WHITE, "Use: /a [Text]");
    if(PlayerInfo[playerid][pAdmin] >=2 || IsPlayerAdmin(playerid)) //
    {
        format(string, sizeof(string), "Trial Admin %s: %s.",name,result);
        SendAdminMessage(COLOR_GREEN,string);
    }
    if(PlayerInfo[playerid][pAdmin] >=3)
    {
        format(string, sizeof(string), "Admin %s: %s.",name,result);
        SendAdminMessage(COLOR_GREEN,string);
    }
    if(PlayerInfo[playerid][pAdmin] >=4)
    {
        format(string, sizeof(string), "Senior Admin %s: %s.",name,result);
        SendAdminMessage(COLOR_GREEN,string);
    }
    if(PlayerInfo[playerid][pAdmin] >=5)
    {
        format(string, sizeof(string), "Owner %s: %s.",name,result);
        SendAdminMessage(COLOR_GREEN,string);
    }
    return 1;
}
When I say something in admin chat it says it for all ranks,
can someone tell me what im doing wrong?
Reply


Messages In This Thread
help with /a command - by Michael_Cuellar - 14.04.2013, 00:57
Re: help with /a command - by zDivine - 14.04.2013, 01:03
Re: help with /a command - by Michael_Cuellar - 14.04.2013, 01:08
Re: help with /a command - by Jessyy - 14.04.2013, 10:20

Forum Jump:


Users browsing this thread: 1 Guest(s)