-.- prob
#1

just appear no admins online why?!!!!!
pawn Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
    new string[128],PlayerName2[MAX_PLAYERS],Count[2];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PInfo[i][Level] > 0)
        {
            if(PInfo[i][Level] > 0) Count[0]++;
        }
        if(Count[0] == 0) return SendClientMessage(playerid, ORANGE, "No Administrators online");

    if(Count[0] > 1)
    {
        for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PInfo[i][Level] > 0)
        {
            GetPlayerName(i,PlayerName2,sizeof(PlayerName2));
            SendClientMessage(playerid,LGREEN,"========= Online Administrators =========");
            format(string, sizeof(string), "Admin: %s [Admin Level %d]", PlayerName2, PInfo[i][Level]);
            SendClientMessage(playerid, YELLOW, string);
            SendClientMessage(playerid,LGREEN,"=========================================");
            }
        }
    }
    return 1;
}
Reply
#2

pawn Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
    new string[128],PlayerName2[MAX_PLAYERS],Count[2];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PInfo[i][Level] > 0)
        {
            Count[0]++;
        }
    }
    if(Count[0] == 0) return SendClientMessage(playerid, ORANGE, "No Administrators online");
    if(Count[0] > 1)
    {
        for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PInfo[i][Level] > 0)
        {
            GetPlayerName(i,PlayerName2,sizeof(PlayerName2));
            SendClientMessage(playerid,LGREEN,"========= Online Administrators =========");
            format(string, sizeof(string), "Admin: %s [Admin Level %d]", PlayerName2, PInfo[i][Level]);
            SendClientMessage(playerid, YELLOW, string);
            SendClientMessage(playerid,LGREEN,"=========================================");
        }
    }
    return 1;
}
Reply
#3

edit:
u forgot to put new but fixed mah self thanks
Reply
#4

i dont think this will work it there is 1 admin online it wont show anything
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)