Jump to content
  • 0

Ajutor Server


Davidoff7776

Question

Salut! Am descarcat acest server http://forum.bugged.ro/topic/202186-gamemode-by-s4urik-panel/. L-am bagat pe host. L-am conectat la mysql si la users mi-am setat admin 6. Dar cand intru pe server si ii vr sa-i dai prietenului meu admin 6 imi zice "Only founders can make admin higher than 4" tin sa mentionez ca am folosit comanda /makeadmin si m-am conectat cu rcon.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
Acum 20 ore, Davidoff7776 a spus:

Uite aici comanda:

CMD:makeadmin(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] >= 6 || EstiFondator(playerid))
        {
            new id,adminlevel,sendername[30],giveplayer[30],string[200],escape[200];
            if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/makeadmin` <Name/Playerid> <Admin Level>");
            if(PlayerInfo[id][pAdmin] >= 6 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti modifica admin level-ul unui admin 6+!.");
            if(adminlevel > 4 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Only founders can make admin higher than 4.");
            if(IsPlayerConnected(id))
            {
                if(id != INVALID_PLAYER_ID)
                {
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, adminlevel);
                    format(string, sizeof(string), "You've been promoted to level %d admin, by %s.", adminlevel, sendername);
                    SendClientMessage(id, COLOR_YELLOW, string);
                    format(string, sizeof(string), "You have promoted %s to a level %d admin.", giveplayer,adminlevel);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    format(string, sizeof(string), "* Admin %s set %s's admin level to %d.", sendername,giveplayer,adminlevel);
                    ABroadCast(COLOR_ADMIN,string,1);
                    HLChat(COLOR_ADMCHAT,string);
                    mysql_real_escape_string(string, escape);
                    PlayerInfo[id][pAdmin] = adminlevel;
                    if(adminlevel == 0)
                    {
                        AdminDuty[id] = 0;
                    }
                    new str[256];
                    mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Admin`='%d' WHERE `name`='%s'",PlayerInfo[id][pAdmin],PlayerInfo[id][pNormalName]);
                    mysql_tquery(SQL,str,"","");
                    mysql_format(SQL,str, sizeof(str), "INSERT INTO staff_logs (`text`) VALUES ('%s')", escape);
                    mysql_tquery(SQL,str,"","");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
        }
    }
    return 1;
}
 

Du te la functia esti fondator si pune nuck ul tau il locul celui de acolo.

  • Like 1
Link to comment
Share on other sites

  • 0
Acum 7 minute, Mr.Pacefull a spus:

Verifica in gamemode care este levelul ce permite sa dai admin 4+, poti verifica in comanda makeadmin, posibil sa fie 7 sau 1339.

Uite aici comanda:

CMD:makeadmin(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] >= 6 || EstiFondator(playerid))
        {
            new id,adminlevel,sendername[30],giveplayer[30],string[200],escape[200];
            if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/makeadmin` <Name/Playerid> <Admin Level>");
            if(PlayerInfo[id][pAdmin] >= 6 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti modifica admin level-ul unui admin 6+!.");
            if(adminlevel > 4 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Only founders can make admin higher than 4.");
            if(IsPlayerConnected(id))
            {
                if(id != INVALID_PLAYER_ID)
                {
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, adminlevel);
                    format(string, sizeof(string), "You've been promoted to level %d admin, by %s.", adminlevel, sendername);
                    SendClientMessage(id, COLOR_YELLOW, string);
                    format(string, sizeof(string), "You have promoted %s to a level %d admin.", giveplayer,adminlevel);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    format(string, sizeof(string), "* Admin %s set %s's admin level to %d.", sendername,giveplayer,adminlevel);
                    ABroadCast(COLOR_ADMIN,string,1);
                    HLChat(COLOR_ADMCHAT,string);
                    mysql_real_escape_string(string, escape);
                    PlayerInfo[id][pAdmin] = adminlevel;
                    if(adminlevel == 0)
                    {
                        AdminDuty[id] = 0;
                    }
                    new str[256];
                    mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Admin`='%d' WHERE `name`='%s'",PlayerInfo[id][pAdmin],PlayerInfo[id][pNormalName]);
                    mysql_tquery(SQL,str,"","");
                    mysql_format(SQL,str, sizeof(str), "INSERT INTO staff_logs (`text`) VALUES ('%s')", escape);
                    mysql_tquery(SQL,str,"","");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
        }
    }
    return 1;
}
 

Link to comment
Share on other sites

  • 0
Acum 42 minute, Davidoff7776 a spus:

Uite aici comanda:

CMD:makeadmin(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] >= 6 || EstiFondator(playerid))
        {
            new id,adminlevel,sendername[30],giveplayer[30],string[200],escape[200];
            if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/makeadmin` <Name/Playerid> <Admin Level>");
            if(PlayerInfo[id][pAdmin] >= 6 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti modifica admin level-ul unui admin 6+!.");
            if(adminlevel > 4 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Only founders can make admin higher than 4.");
            if(IsPlayerConnected(id))
            {
                if(id != INVALID_PLAYER_ID)
                {
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, adminlevel);
                    format(string, sizeof(string), "You've been promoted to level %d admin, by %s.", adminlevel, sendername);
                    SendClientMessage(id, COLOR_YELLOW, string);
                    format(string, sizeof(string), "You have promoted %s to a level %d admin.", giveplayer,adminlevel);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    format(string, sizeof(string), "* Admin %s set %s's admin level to %d.", sendername,giveplayer,adminlevel);
                    ABroadCast(COLOR_ADMIN,string,1);
                    HLChat(COLOR_ADMCHAT,string);
                    mysql_real_escape_string(string, escape);
                    PlayerInfo[id][pAdmin] = adminlevel;
                    if(adminlevel == 0)
                    {
                        AdminDuty[id] = 0;
                    }
                    new str[256];
                    mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Admin`='%d' WHERE `name`='%s'",PlayerInfo[id][pAdmin],PlayerInfo[id][pNormalName]);
                    mysql_tquery(SQL,str,"","");
                    mysql_format(SQL,str, sizeof(str), "INSERT INTO staff_logs (`text`) VALUES ('%s')", escape);
                    mysql_tquery(SQL,str,"","");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
        }
    }
    return 1;
}
 

CMD:makeadmin(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] >= 6 || EstiFondator(playerid))
        {
            new id,adminlevel,sendername[30],giveplayer[30],string[200],escape[200];
            if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/makeadmin` <Name/Playerid> <Admin Level>");
            if(PlayerInfo[id][pAdmin] >= 6 && !EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti modifica admin level-ul unui admin 6+!.");
            if(IsPlayerConnected(id))
            {
                if(id != INVALID_PLAYER_ID)
                {
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, adminlevel);
                    format(string, sizeof(string), "You've been promoted to level %d admin, by %s.", adminlevel, sendername);
                    SendClientMessage(id, COLOR_YELLOW, string);
                    format(string, sizeof(string), "You have promoted %s to a level %d admin.", giveplayer,adminlevel);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    format(string, sizeof(string), "* Admin %s set %s's admin level to %d.", sendername,giveplayer,adminlevel);
                    ABroadCast(COLOR_ADMIN,string,1);
                    HLChat(COLOR_ADMCHAT,string);
                    mysql_real_escape_string(string, escape);
                    PlayerInfo[id][pAdmin] = adminlevel;
                    if(adminlevel == 0)
                    {
                        AdminDuty[id] = 0;
                    }
                    new str[256];
                    mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Admin`='%d' WHERE `name`='%s'",PlayerInfo[id][pAdmin],PlayerInfo[id][pNormalName]);
                    mysql_tquery(SQL,str,"","");
                    mysql_format(SQL,str, sizeof(str), "INSERT INTO staff_logs (`text`) VALUES ('%s')", escape);
                    mysql_tquery(SQL,str,"","");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
        }
    }
    return 1;
}

tine comanda buna succes cu sv

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.