Registration help
#1

When I try to register it always tells me that I am already registered.

This is the Code:

Код:
COMMAND:register(playerid, params[])
{
	new password[128],string[128];
	if(sscanf(params, "s[128]", password)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /register [password]");
	else
	{
	    if (PlayerInfo[playerid][pPlayerLogged] == 1) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
	    if(strlen(params) > 30) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password is too long.");
		format(string, sizeof(string), "users/%s.ini", PlayerName(playerid));
	    mysql_real_escape_string(PlayerName(playerid), Escape[2]);
		if(dini_Exists(string)) return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: That name is already registered, and not converted!");
	    format(string, 128, "SELECT * FROM Accounts WHERE Username = '%s'", Escape[2]);
	    mysql_query(string);
	    mysql_store_result();
		if(mysql_num_rows() == 0) {
		    mysql_free_result();
		 	OnPlayerRegister(playerid, password);
            OnConnectInit(playerid);
            OnPlayerDataSave(playerid);
		    SendClientMessage(playerid, COLOR_WHITE, "SERVER: Type /login [password] to continue.");
		 	return 1;
		}
		else {
		    SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: That name is already registered!");
			mysql_free_result();
		}
	}
	return 1;
}
Reply
#2

any help will be appretiated
Reply
#3

I dont get it.. Did you write this your self or copy and paste, You need to indent this....
Reply
#4

i copy paste it. My problem is my i register in my gamemode it tells me that i am already registered
Reply
#5

Who exactly gave you permission to use PR-RP?
Reply
#6

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
Who exactly gave you permission to use PR-RP?
Exactly.
Reply
#7

i want a simple help that when i register it tells me i already registered. And where the hell PR-RP comes from
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)