Admin Duty
#7

Try that

pawn Код:
CMD:aduty(playerid, params[])
{
    new iadminname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, iadminname, sizeof(iadminname));
    if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
    if(PlayerInfo[playerid][pAdminDuty] == 0)
    {

        SendClientMessage(playerid, 0xFFFF00AA, "You are now on administrative duty! Remember to check /reports!");
                SetPlayerName(playerid, "[CnR] %s", iadminname);
        PlayerInfo[playerid][pAdminDuty] = 1;
        SetPlayerHealth(playerid, 100000);
        SetPlayerArmour(playerid, 100000);
        SetPlayerColor(playerid, 0xFF8C00AA);
        new string[128];
        format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
        SendClientMessageToAll(COLOR_YELLOW, string);
    }
    else
    {
        SendClientMessage(playerid, 0xAA3333AA, "You are now off admin duty!");
        SetPlayerName(playerid, iadminname);
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 0);
        SetPlayerToTeamColor(playerid);
        PlayerInfo[playerid][pAdminDuty] = 0;
        new string[128];
        format(string, sizeof(string), "Administrator %s is now Off Admin Duty! ( Leave the Admin to Roleplay )", GetPlayerNameEx(playerid));
        SendClientMessageToAll(0xFFFF00AA, string);
    }
    return 1;
}
Reply


Messages In This Thread
Admin Duty - by Mriss - 22.02.2014, 01:51
Re: Admin Duty - by ahmedkoki - 22.02.2014, 02:00
Re: Admin Duty - by Mriss - 22.02.2014, 02:03
Re: Admin Duty - by ahmedkoki - 22.02.2014, 02:06
Re: Admin Duty - by Mriss - 22.02.2014, 02:08
Re: Admin Duty - by Mriss - 22.02.2014, 02:12
Re: Admin Duty - by ahmedkoki - 22.02.2014, 02:33

Forum Jump:


Users browsing this thread: 1 Guest(s)