[Errors]/admins ON/OFF DUTY
#3

Give this a shot. No it was not copied from anywhere... created from scratch.

pawn Код:
if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/admini", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new count = 0;
            SendClientMessage(playerid, LIGHTBLUE, "[__________MacedonianWorld Admin™__________]");
            foreach (Player, i)
            {
                if(PlayerInfo[i][pAdmin] > 0)
                {
                    new admtext[25];
                    switch(PlayerInfo[i][pAdmin])
                    {
                        case 1: admtext = "Administrator(1)";
                        case 2: admtext = "Administrator(2)";
                        case 3: admtext = "Administrator(3)";
                        case 4: admtext = "Administrator(4)";
                        case 5: admtext = "Administrator za Lideri";
                        case 1336: admtext = "Support Admin";
                        case 1337: admtext = "Z.Head Admin Manager";
                        case 1338: admtext = "Head Admin";
                    }
                    GetPlayerName(i, sendername, sizeof(sendername));
                    if(AdminDuty[i] == 1)
                    {
                        format(string, sizeof(string), "%s: %s | {00FF00}On Duty",admtext, sendername);
                    }
                    else if(AdminDuty[i] == 0)
                    {
                        format(string, sizeof(string), "%s: %s | {FF0000}Off Duty",admtext, sendername);
                    }
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    count++;
                }
            }
            if(count == 0) return SendClientMessage(playerid, 0xFF0000FF, "There are no administrators online.");
        }
    }
    return 1;
}
I think it might of had something to do with the color embedding you were trying to do, hexcodes are also a suitable option for this.
Reply


Messages In This Thread
[Errors]/admins ON/OFF DUTY - by imnoob - 13.07.2013, 16:22
Re: [Errors]/admins ON/OFF DUTY - by CrazyChoco - 13.07.2013, 16:26
Re: [Errors]/admins ON/OFF DUTY - by Threshold - 13.07.2013, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)