12.03.2014, 16:05
(
Последний раз редактировалось Blademaster680; 12.03.2014 в 17:21.
)
Resolved
When my player registers everything works fine, it just doesnt insert the information into the playerdata table.
Please help.
Here is my code:
When my player registers everything works fine, it just doesnt insert the information into the playerdata table.
Please help.
Here is my code:
Код:
case DIALOG_REGISTER:
{
if(response)
{
if(strlen(inputtext) == 0)
{
new IP[16], str[128], string[168];
GetPlayerIp(playerid, IP, 16);
format(string, sizeof(string), "Welcome to Legion of Los Angeles, %s \n\n IP Address: %i \n\n You may register an account by entering a desired password here:", GetName(playerid), IP);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, str, string, "Register", "Cancel");
}
else
{
new EscapedText[60], Query[168];
mysql_real_escape_string(inputtext, EscapedText);
format(Query, sizeof(Query), "INSERT INTO `playerdata` (Name,Password,Cash) VALUES ('%s','%s,'0')", GetName(playerid), EscapedText);
mysql_query(Query);
SendClientMessage(playerid, -1, "You have successfully registered.");
GivePlayerMoney(playerid, 5000);
SetPlayerScore(playerid, 1);
}
}
}

