Mysql query is succesfully executed but doesnt appear in the table
#5

You're right. But why did that work before? I now have this and it works but now i got zero's where i dont want anything in the database.
pawn Код:
Dialog_Register(playerid, response, inputtext[])
{
    switch(response)
    {
        case 1:
        {
            new escpass[100];
            mysql_real_escape_string(inputtext, escpass);
            print (escpass);
            if(AccountExists[playerid])
                return SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] You're already registered!");

            if(APlayerData[playerid][PlayerLogged] == 1)
                return SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] You're already logged in!");

            if(strlen(inputtext) < 3 || strlen(inputtext) >= 32)
            {
                SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] Your password is too short or too long!");
                ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_PASSWORD, "Welcome to European Trucking", "Welcome to European Trucking please register in order to play", "Register", "Cancel");
            }
            CheckMySQL();
            new string2[500], buf[129];
            WP_Hash(buf, 129, escpass);
            format(string2, 500, "INSERT INTO Users (Name, Password, Admin, Money, Score, Fines, Muted, ECoins, MLevel, IP, LastIP, Houses, Club, PJobs, TJobs, CJobs, CoJob, PFed, JJObs, Kmdriven, signature) VALUES ('%s', '%s', 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ' ')", APlayerData[playerid][Name], buf);
            mysql_pquery( Handle, string2, "", "" );
            print(string2);
            AccountExists[playerid] = 1;
            SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] Your account has been created, please login now!");

            ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, "Welcome to European Trucking", "Welcome to European Trucking please login in order to play", "Login", "Cancel");

            new string1[128], IP[16], pName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pName, sizeof(pName));
            GetPlayerIp(playerid, IP, sizeof(IP));
            format(string1, sizeof(string1), "UPDATE Users SET IP = '%s' WHERE Name='%s'", IP, pName);
            mysql_pquery( Handle, string1, "", "" );
            SendClientMessage(playerid, 0xFF0000, "You have been given 5.000$ starter money");
            GivePlayerCash(playerid, 5000);
            SavePlayer(playerid);
        }
        case 0:
        {
            Kick(playerid);
        }
    }
    return 1;
}
Again, why did the thing work before where i just had name and password?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)