Dialogs wont show upon login
#1

Alright, so I have made the mysql entries and such and as I connect this is all I see:

http://snag.gy/6Lz7u.jpg (pic is big, click the link)

How do I get rid of the arrows and the 'spawn' thing?

The mysql connects via a stock function, CheckIfBanned:

pawn Код:
stock CheckIfBanned(playerid)
    {
        new ip[16], string[256], query[256], reason[128], admin[24], i[128], seconds;
        GetPlayerIP(playerid, ip, sizeof(ip));
       
        format(query, sizeof(query), "SELECT * FROM `bans` WHERE `Username` = '%s' AND `Banned` = '1'", GetName(playerid));
        mysql_query(query);
        mysql_store_result();
       
       
        print("Found banned user, declining connections");
       
        if(mysql_num_rows > 0)
        {
            while(mysql_fetch_row_format(query, "|"))
            {
                mysql_fetch_field_row(i, "Reason"); format(reason, sizeof(reason), i);
                mysql_fetch_field_row(i, "Seconds"); seconds = strval(i);
                mysql_fetch_field_row(i, "Admin"); format(admin, sizeof(admin), i);
            }
            if(seconds > gettime())
            {
                format(string, sizeof(string), "You are temporarily banned from Los Angeles Roleplay.");
                SendClientMessage(playerid, WHITE, string);
               
                format(string, sizeof(string), "You will be unbanned in "ADMIN_EMBED"%s"WHITE_EMBED"", timecompare(gettime()-(gettime()-seconds)));
                SendClientMessage(playerid, WHITE, string);
               
                format(string, sizeof(string), "Reason for ban: "ADMIN_EMBED"%s"WHITE_EMBED"", reason);
                SendClientMessage(playerid, WHITE, string);
               
                Kick(playerid);
            }
            else
            {
                format(query, sizeof(query), "UPDATE `bans` SET `Banned` = '0' WHERE `Username` = '%s'", GetName(playerid));
                SendClientMessageToAll(WHITE, "(( User "GREEN_EMBED"%s"WHITE_EMBED" has been unbanned from LA-RP. ))", GetName(playerid));
            }
        }
        else
        {
            new Strings[256], pname[24], query[200];
            GetPlayerName(playerid, pname, 24);
           
            format(query, sizeof(query), "SELECT * FROM `accounts` WHERE `Username` = '%s'", pname);
            mysql_query(query);
            mysql_store_result();
           
            new nrows = mysql_num_rows();
            if(!nrows)
            {
                format(Strings, sizeof(Strings), "Hello and welcome to Los Angeles Roleplay.\n\nThis name (%s) is not registered, please input a desired password\nbelow:", GetName(playerid));
                ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_PASSWORD, "Account not Found", Strings, "Register", "Cancel");
                SendClientMessageToAll(WHITE, "(( %s has joined the server! ))", GetName(playerid));
            }
            if(nrows == 1)
            {
                format(Strings2, 200, "Hello and welcome to Los Angeles Roleplay.\n\nThis name (%s) is indeed registered, please login with your password below:", GetName(playerid));
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Account Found", Strings2, "Login", "Cancel");
                SendClientMessageToAll(WHITE, "(( %s has joined the server! ))", GetName(playerid));
            }
            mysql_free_result();
        }
        mysql_free_result();
        return 1;
    }
though it doesnt do anything. I dont know if MySQL is case sensitive or something, though it doesnt work
Reply
#2

Anyone?
Reply
#3

Still awaiting an answer, is there any solution to this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)