Database not creating new users
#1

Whenever I join my server under another name, it just overwrites the previous account in the database.
Код:
stock RegisterPlayer(playerid, regpass[])
{
	new query[256], EncryptedPass[130];

	WP_Hash(EncryptedPass, sizeof(EncryptedPass), regpass);
    printf("player pass: %s",EncryptedPass);
	format(query, sizeof(query), "INSERT INTO users (Name, Password) VALUES ('%s', '%s')", GetName(playerid), EncryptedPass);
	mysql_query(query);
    printf("Player ID %d (%s) has been registered", playerid, GetName(playerid));
    SendClientMessage(playerid, -1, "Account registered!");
	LoginPlayer(playerid);

	return 1;
}
Reply


Messages In This Thread
Database not creating new users - by CrystalMethod - 21.03.2017, 19:23
Re: Database not creating new users - by LetsOWN[PL] - 22.03.2017, 13:35

Forum Jump:


Users browsing this thread: 1 Guest(s)