SA-MP Forums Archive
Registration help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Registration help (/showthread.php?tid=200725)



Registration help - TopAz07 - 19.12.2010

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;
}



Re: Registration help - TopAz07 - 19.12.2010

any help will be appretiated


Re: Registration help - [UG]Scripter - 19.12.2010

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


Re: Registration help - TopAz07 - 19.12.2010

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


Re: Registration help - [L3th4l] - 19.12.2010

Who exactly gave you permission to use PR-RP?


Re: Registration help - Mean - 19.12.2010

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


Re: Registration help - TopAz07 - 19.12.2010

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