SA-MP Forums Archive
-.- prob - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: -.- prob (/showthread.php?tid=187945)



-.- prob - dark_clown - 05.11.2010

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;
}



Re: -.- prob - MadeMan - 05.11.2010

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;
}



Re: -.- prob - dark_clown - 05.11.2010

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


Re: -.- prob - (SF)Noobanatior - 05.11.2010

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