Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted (edited)

Salut, am gasit un bug la gm hpq123 legat de setadmin. Imi setez admin 8 (din baza de date)  si dupa dau /setadmin si imi zice ca nu am access.

YCMD:setadmin(playerid, params[], help)
{
    if(IsPlayerConnected(playerid)) {
        if(PlayerInfo[playerid][pScripter] == 0) return SCM(playerid, COLOR_ERROR, "Nu ai access.");
        new id,adminlevel,sendername[30],giveplayer[30],string[200];
        if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, COLOR_GREY, "Sintaxa: {FFFFFF}/setadmin <playerid/name> <Admin Level>");
        if(IsPlayerConnected(id)) {
            if(id != INVALID_PLAYER_ID)
            {
                GetPlayerName(id, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, sendername, sizeof(sendername));
                PlayerInfo[id][pAdmin] = adminlevel;
                PlayerInfo[id][pChar] = 217;
                SetPlayerSkinEx(id, 217);
                printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, adminlevel);
                format(string, sizeof(string), "Ai fost promovat la admin %d de %s,", adminlevel, sendername);
                SendClientMessage(id, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "L-ai promovat pe %s la nivel %d admin.", giveplayer,adminlevel);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "AdmCmd: Admin %s i-a setat lui %s admin %d.", sendername,giveplayer,adminlevel);
                Iter_Add(PlayerAdmins, id);
                SendAdminMessage(COLOR_LOGS,string,4);
                 new wakaname[25];
                 if(adminlevel == 0) {
                    PlayerInfo[id][pAW] = 0;
                    UpdateVar(id, "AW", 0);
                    SpecFaction[id] = 0;
                    StopFly(playerid);
                    UsedFly[playerid] = 0;
                    SetPlayerHealthEx(playerid, 100);

                    Iter_Remove(PlayerAdmins, id);
                }
                GetPlayerName(id,wakaname,25);
                new str[256];
                mysql_format(SQL, str,256,"UPDATE users SET `Admin`='%d',`CChar`='%d' WHERE `ID`='%d'",PlayerInfo[id][pAdmin],PlayerInfo[id][pChar],PlayerInfo[id][pSQLID]);
                mysql_tquery(SQL,str, "", "");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
        }
    }
    return true;
}

 

 

Edited by zAlex_Alx
Posted (edited)

Setează in baza de date scripter 1 fondator : 2 scripter

Edited by HPQ123

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.