Jump to content

Bug hpq123


Recommended Posts

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);
                 new wakaname[25];
                 if(adminlevel == 0) {
                    PlayerInfo[id][pAW] = 0;
                    UpdateVar(id, "AW", 0);
                    SpecFaction[id] = 0;
                    UsedFly[playerid] = 0;
                    SetPlayerHealthEx(playerid, 100);

                    Iter_Remove(PlayerAdmins, id);
                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, "", "");
            SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
    return true;



Edited by zAlex_Alx
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.

Reply to this topic...

×   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.