04.06.2012, 02:28
Hello everybody! When I try to register in my server using MySQl register system the server crashes with the function mysql_real_escape_string.
PD: I'm using this test FS https://sampforum.blast.hk/showthread.php?tid=269610
pawn Код:
mysql_real_escape_string(inputtext, escpass);
WP_Hash(largestring, sizeof(largestring), escpass);
GetPlayerIp(playerid, PIP, 50);
format(Query, sizeof(Query), "INSERT INTO `playerinfo` (`user`, `password`, `kills`, `deaths`, `score`, `money`, `IP`, `adminlvl`) VALUES ('%s', '%s', 0, 0, 0, 0, '%s', 0)", escpname(playerid), largestring, PIP);
mysql_query(Query);
GameTextForPlayer(playerid, "~g~Registrado", 2000, 3);
SendClientMessage(playerid, 0x0000D9AA, "Registrado y logeado correctamente!");
SetPVarInt(playerid, "Logged", 1);