Doesn't show dialog
#9

im inserted printf("admin level %i", PlayerData[playerid][AdminLevel]); but he show admin level 0, but on clicked me from TAB, show admin level 4

Код:
case DIALOG_LOGIN: 
        {
            if(!response) Kick(playerid);
            new hpass[129]; 
            WP_Hash(hpass, 129, inputtext); 
            if(!strcmp(hpass, PlayerData[playerid][Password])) 
            { 
                mysql_format(Mysql_users, query, sizeof(query), "SELECT * FROM `"ZAIDEJU_LENTELE"` WHERE `Fullname` = '%e' LIMIT 1", GetPlayersName(playerid));
                mysql_tquery(Mysql_users, query, "Loadplayerdata", "i", playerid);
                // admin kodas
                printf("admin level %i", PlayerData[playerid][AdminLevel]);
                if(PlayerData[playerid][Banned] == 1)
                {
                    foreach(Player, i)
                    {
                        if(PlayerData[i][AdminLevel] >=1 )
                        {
                            format(string, sizeof(string), "[Serveris]:{FFFFFF} %s neprisijungė prie serverio, jis yra uћblokuotas.", GetPlayersName(playerid));
                            SendClientMessage(i, COLOR_PALERED, string);
                        }
                    }
                    format(string, sizeof(string), "{FF0000}Prieћastis:{FFFFFF} %s\n{FF0000}Uћblokavo:{FFFFFF} %s\n{FF0000}Jeigu manote kad čia yra free ban, raљykite forume", PlayerData[playerid][BanReason], PlayerData[playerid][BannedBy]);


                    ShowPlayerDialog(playerid, 25565, DIALOG_STYLE_MSGBOX, "Jūs esate uћblokuotas.", string , "Gerai", "");
                    KickEx(playerid);
                    return 1;
                }
                if(PlayerData[playerid][AdminLevel] >= 4)
                {
                    ShowPlayerDialog(playerid, DIALOG_ADMINAUTH, DIALOG_STYLE_INPUT, "Administracijos apsauga", "įveskite administratoriaus kodą, kad galėtumėte tęsti", "Gerai", "Atљaukti");
                }
                else
                {
                    SpawnPlayer(playerid);
                    format(string, sizeof(string), "Sveiki(-a), %s atvykę(-usi) į {0080C0}"PAVADINIMAS" {FFFFFF} .", GetPlayersName(playerid));
                    SendClientMessage(playerid, COLOR_SERVER, string);
                    new manoip[20];
                    GetPlayerIp(playerid, manoip, sizeof(manoip));
                    new msg[256];
                    format(msg, sizeof(msg), "{FFFF88}Uћsiregistravote: {FF8C1A}%s\n{FFFF88}Paskutinis prisijungimas: {FF8C1A}%s\n{FFFF88}Paskutinis prisijungimas iљ љio IP: {FF8C1A}%s\n{FFFF88}Jūsų IP: {FF8C1A}%s", PlayerData[playerid][Registered], PlayerData[playerid][LastLogin], PlayerData[playerid][LastIP], manoip);
                    ShowPlayerDialog(playerid, 25565, DIALOG_STYLE_MSGBOX, "Prisijungėte", msg, "Gerai", "");
                    new textas[128];
                    new ye,mon,dd;
                    new hr,mins,sec;
                    getdate(ye,mon,dd);
                    gettime(hr,mins,sec);
                    format(textas, sizeof(textas), "%d-%d-%d %d-%d-%d", ye, mon, dd, hr, mins, sec);
                    mysql_format(Mysql_users, query, sizeof(query), "UPDATE `"ZAIDEJU_LENTELE"` SET LastLogin = '%e', LastIP = '%e' WHERE Fullname= '%e'",textas, manoip, GetPlayersName(playerid));
                    mysql_tquery(Mysql_users, query, "", "");
                    gIsPlayerLoggedIn[playerid] = 1;
                }
            }
            else 
            {
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Prisijungimas", "Praљome įvesti slaptaћodį kurį vedėte registracijoje\n{FF0000}Neteisingas slaptaћodis", "Prisijungti", "Iљeiti"); 
            }
        }
Reply


Messages In This Thread
Doesn't show dialog - by TheNerka - 18.10.2014, 16:51
Re: Doesn't show dialog - by 0x41726d79 - 18.10.2014, 16:55
Re: Doesn't show dialog - by TheNerka - 18.10.2014, 16:57
Re: Doesn't show dialog - by TheNerka - 18.10.2014, 17:07
Re: Doesn't show dialog - by austin070 - 18.10.2014, 17:13
Re: Doesn't show dialog - by TheNerka - 18.10.2014, 17:23
Re: Doesn't show dialog - by austin070 - 18.10.2014, 17:41
Re: Doesn't show dialog - by TheNerka - 18.10.2014, 17:49
Re: Doesn't show dialog - by TheNerka - 18.10.2014, 18:07
Re: Doesn't show dialog - by 0x41726d79 - 18.10.2014, 18:49

Forum Jump:


Users browsing this thread: 1 Guest(s)