29.01.2016, 14:58
Alright so the problem is really simple but Im not sure whats causing it since there are no errors or anything in SQL or such...
Player A registers and everything is fine, now person B logs in and gets person A stats for some bloody reason (sorry for cursing...). Only person B gets their stats, no one else
code for registration
It doesnt happen all the time, just sometimes...
Player A registers and everything is fine, now person B logs in and gets person A stats for some bloody reason (sorry for cursing...). Only person B gets their stats, no one else
code for registration
PHP код:
if(!response) return Kick(playerid);
if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", "In order to play, you need to register.\nYour password must be at least 6 characters long!", "Register", "Quit");
new query[512],string[128];
WP_Hash(AccInfo[playerid][Password], 129, inputtext);
mysql_format(mysql, query, sizeof(query), "INSERT INTO `players` (`Username`, `Password`, `IP`, `Admin`, `VIPLevel`,`CharactersCreated`,`AgeStarted`) VALUES ('%e', '%e', '%e',0,0,0,%d)", Name[playerid], AccInfo[playerid][Password], IP[playerid],gettime());
mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);