SA-MP Forums Archive
how to add - 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: how to add (/showthread.php?tid=521118)



how to add - ReD_DeVi - 21.06.2014

If my server's max admin level is 6 how to increase to 10 can anyone say please help me with this problem


Re: how to add - GeekSiMo - 21.06.2014

What is your ADmin System ?


Re: how to add - Abagail - 21.06.2014

Um, if you have a define with something like "MAX_ADMINLEVEL" I guess you'd change it to 10? If not, show your code...


Re: how to add - ReD_DeVi - 21.06.2014

i am using my own system my gamemode is SATDM


Re: how to add - GeekSiMo - 21.06.2014

Send Me an Admin Command !


Re: how to add - ReD_DeVi - 21.06.2014

Код:
CMD:admins(playerid,params[])
{
    new Count = 0;
    new n[MAX_PLAYER_NAME];
    new string[1000];
//    SendClientMessage(playerid, 0x00FF00FF, "__________|Admins|__________");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(PlayerInfo[i][Level] < 1) continue;
        GetPlayerName(i,n,sizeof(n));
        format(string,sizeof(string),"%sLevel %d: %s (ID: %d) - %s\n", string, PlayerInfo[i][Level], n, i, GetRankFromLevel(i));
        Count++;
    }
    if(Count == 0)
    {
        ShowPlayerDialog(playerid, 2,DIALOG_STYLE_MSGBOX, "online admins..", "No admins online", "ok", "");
        return 1;
    }
    ShowPlayerDialog(playerid, 2,DIALOG_STYLE_MSGBOX, "online admins..", string, "ok", "");
    return 1;
}
stock GetRankFromLevel(playerid)
{
    new Rank[40];
    switch(PlayerInfo[playerid][Level])
    {
        case 0:
        {
            Rank = "Regular Player";
        }
        case 1:
        {
            Rank = "Trial Administrator";
        }
        case 2:
        {
            Rank = "Junior Moderator";
        }
        case 3:
        {
            Rank = "Moderator";
        }
        case 4:
        {
            Rank = "Head Moderator";
        }
        case 5:
        {
            Rank = "Junior Administrator";
        }
        case 6:
        {
            Rank = "Administrator";
        }
        case 7:
        {
            Rank = "Senior Administrator";
        }
        case 8:
        {
            Rank = "Head Administrator";
        }
        case 9:
        {
            Rank = "Developer";
        }
        case 10:
        {
            Rank = "Head Developer";
        }
    }
    return Rank;
}
i added the rank but when i try it in the server its not working


Re: how to add - GeekSiMo - 21.06.2014

what you have to do is edditing and adding admin commands
like that PlayerInfo[playerid][Level] >= 1-10 and EDIT the SEtlevel command to = 10