SA-MP Forums Archive
VIP list :| - 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)
+--- Thread: VIP list :| (/showthread.php?tid=369908)



VIP list :| - Gursimran - 18.08.2012

hello guys i am using LuxAdmin System !! Can you help me a little with VIP list !!

i want when more than 3 VIPS are online , it should automatically change the line in VIP list !! please Help me

this is my VIP List !!


pawn Код:
dcmd_vips(playerid,params[])
{
    #pragma unused params
    if(AccInfo[playerid][LoggedIn] == 1)
    {
        if(AccInfo[playerid][Level] >= 0)
        {
            new bool:First2 = false;
            new Count, i;
            new string[128];
            new adminname[MAX_PLAYER_NAME];
            for(i = 0; i < MAX_PLAYERS; i++)
            if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
            Count++;

            if(Count == 0)
            return SendClientMessage(playerid,red, "No players have VIP Account!");

            for(i = 0; i < MAX_PLAYERS; i++)
            if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
            {
                if(AccInfo[i][pVip] > 0)
                {
                    switch(AccInfo[i][pVip])
                    {
                    case 1: AccType = "Free";
                    case 2: AccType = "Silver";
                    case 3: AccType = "Premium";
                    }
                }
                GetPlayerName(i, adminname, sizeof(adminname));
                if(!First2)
                {
                    format(string, sizeof(string), "VIP Players: %s [%s]", PlayerName2(i),AccType);
                    First2 = true;
                }
                    else format(string,sizeof(string),"%s, %s [%s]",string, PlayerName2(i),AccType);
            }
            return SendClientMessage(playerid,yellow,string);
        }
        else return ErrorMessages(playerid, 1);
    }
    else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}



Re: VIP list :| - -Sam_hero- - 18.08.2012

well, yea, there was an error, with Colors..I fixed it with kamal.