How to short this?
#2

This has not been tested, but it should work:

pawn Код:
CMD:ah(playerid, params[]) return cmd_ahelp(playerid, params);
CMD:ahelp(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] <= 0) return 0;
    SendClientMessage(playerid, COLOR_YELLOW, "==============================");
    if(PlayerInfo[playerid][pAdminLevel] >= 1)
    {
        SendClientMessage(playerid, COLOR_WHITE, "Level 1: /slap, /gethere");
        SendClientMessage(playerid, COLOR_WHITE, "Level 1: /slay");
        SendClientMessage(playerid, COLOR_WHITE, "Level 1: /spec, /specoff");
        SendClientMessage(playerid, COLOR_WHITE, "Level 1: /gotoplace, /goto");
        SendClientMessage(playerid, COLOR_WHITE, "Level 1: /killcar");
    }
    if(PlayerInfo[playerid][pAdminLevel] >= 2)
    {
        SendClientMessage(playerid, COLOR_WHITE, "Level 2: /announce, /warn, /kick");
    }
    if(PlayerInfo[playerid][pAdminLevel] >= 3)
    {
        SendClientMessage(playerid, COLOR_WHITE, "Level 3: /ban");
    }
    if(PlayerInfo[playerid][pAdminLevel] >= 4)
    {
        SendClientMessage(playerid, COLOR_WHITE, "Level 4: /givemoney, /givegun ");
        SendClientMessage(playerid, COLOR_WHITE, "Level 4: /sethp, /setarmour");
        SendClientMessage(playerid, COLOR_WHITE, "Level 4: /setscore, /v");
        SendClientMessage(playerid, COLOR_WHITE, "Level 4: /respawncars");
    }
    if(PlayerInfo[playerid][pAdminLevel] >= 5)
    {
        SendClientMessage(playerid, COLOR_WHITE, "Level 5: /restartserver, /setadmin");
    }
    if(PlayerInfo[playerid][pAdminLevel] >= 6)
    {
        // Level 6 doesn't have any priority commands?
    }
    if(PlayerInfo[playerid][pAdminLevel] >= 7)
    {
        SendClientMessage(playerid, COLOR_WHITE, "Level 7: /banofflineplayer");
    }
    SendClientMessage(playerid, COLOR_YELLOW, "==============================");
    return 1;
}
Reply


Messages In This Thread
How to short this? - by Squirrel - 06.05.2013, 00:03
Re: How to short this? - by JJB562 - 06.05.2013, 01:09
Re: How to short this? - by Richie© - 06.05.2013, 01:10
AW: How to short this? - by Squirrel - 06.05.2013, 15:35

Forum Jump:


Users browsing this thread: 2 Guest(s)