Admin Duty
#1

Well I kinda need an admin duty system this is the admin system thingo (cant explain it lol)
Код:
if(PlayerInfo[playerid][Admin] >= 1)
CMDs needed - /aduty , again to get off
/admins to show admins on duty I tried making one but failed... as usual :P
Reply
#2

You should use and remove to add "pAdminDuty" in enum pinfo

pawn Код:
CMD:aduty(playerid, params[])
{
    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!");
        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!");
        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
#3

Gimmie your colour defines :P
Reply
#4

Quote:
Originally Posted by Mriss
Посмотреть сообщение
Gimmie your colour defines :P
I edited my post with the colors try now
Reply
#5

The Colours arent there D:, Oh and btw, enjoy your +Rep from me
Reply
#6

oh could you do so it pputs a Prefix infront of their name? like [CnR](ADMINS NAME HERE) but then removes the prefix?
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)