Need help with /admins and another thing
#5

Ok, let me see if i can help.

I've cut and edited a bit from my script, it's fully made. No bugs as far as i know. You can use this or try and learn from it.

The basic format is

Example

Romas3110 - Level 7


If no admins are connected.

No Admins are connected in the server.


pawn Код:
CMD:admins(playerid, params[])
{
    new str[128];
    new OnAdmins = 0;
    SendClientMessage(playerid,-1,"-----------------------------------Admins Online-----------------------------------");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][pAdmin] != 0)
            {
                GetPlayerName(i,Nam,MAX_PLAYER_NAME);
                if(PlayerInfo[i][pAdmin] == 7)
                {
                    format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 7",Nam);
                    SendClientMessage(playerid,-1,str);
                }
                if(PlayerInfo[i][pAdmin] == 6)
                {
                    format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 6",Nam);
                    SendClientMessage(playerid,-1,str);
                }
                if(PlayerInfo[i][pAdmin] == 5)
                {
                    format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 5",Nam);
                    SendClientMessage(playerid,-1,str);
                }
                if(PlayerInfo[i][pAdmin] == 4)
                {
                    format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 4",Nam);
                    SendClientMessage(playerid,-1,str);
                }
                if(PlayerInfo[i][pAdmin] == 3)
                {
                    format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 3",Nam);
                    SendClientMessage(playerid,-1,str);
                }
                if(PlayerInfo[i][pAdmin] == 2)
                {
                    format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 2",Nam);
                    SendClientMessage(playerid,-1,str);
                }
                if(PlayerInfo[i][pAdmin] == 1)
                {
                    format(str, sizeof(str), "{0074D9}%s {FFFFFF}Level 1",Nam);
                    SendClientMessage(playerid,-1,str);
                }
                OnAdmins ++;
            }
        }
    }
    if(OnAdmins == 0)
    {
        SendClientMessage(playerid,0xFF0000FF,"No Admins are connected in the server.");
    }
    return 1;
}
Reply


Messages In This Thread
Need help with /admins and another thing - by [DX]Aru12345 - 18.03.2013, 11:59
Re: Need help with /admins and another thing - by Jstylezzz - 18.03.2013, 12:10
Re: Need help with /admins and another thing - by AndreT - 18.03.2013, 12:11
Re: Need help with /admins and another thing - by park4bmx - 18.03.2013, 12:19
Re: Need help with /admins and another thing - by romas3110 - 18.03.2013, 12:21
Re: Need help with /admins and another thing - by denNorske - 18.03.2013, 13:06
Re: Need help with /admins and another thing - by romas3110 - 18.03.2013, 13:14

Forum Jump:


Users browsing this thread: 1 Guest(s)