SA-MP Forums Archive
Register Problem - 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)
+--- Thread: Register Problem (/showthread.php?tid=359165)



Register Problem - Scott_Williams - 13.07.2012

Hi, When I want to register the server and enter the password in the box to register my reappears as nothing happened.

Check:


After I entry the password:



Код:
public OnPlayerRegister(playerid, password[]) // v1.0 by Luk0r
{
	if(IsPlayerConnected(playerid))
	{
		MySQLCheckConnection();
		new playername3[MAX_PLAYER_NAME];
		GetPlayerName(playerid, playername3, sizeof(playername3));
		new newaccountsqlid = MySQLCreateAccount(playername3, password, playerid);
		if (newaccountsqlid != 0)
		{
			new loginstring[128];
			PlayerInfo[playerid][pSQLID] = newaccountsqlid;
			strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
			OnPlayerUpdateEx(playerid);
            format(loginstring,sizeof(loginstring),"Welcome, %s\nThats nickname is registered.\nPlease log-in",playername3);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Exit");
			return 1;
		}
		else
		{
			gPlayerAccount[playerid] = 0;
			new regstring[256];
			new regname[64];
			GetPlayerName(playerid,regname,sizeof(regname));
			format(regstring,sizeof(regstring),"{BECBFC}Welcome to the server, {95A3FF}%s{BECBFC}! \n\nPlease register an account by entering your desired password below.",regname);
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Account Register",regstring,"Register","Exit");
		}
	}
	return 0;
}



Re: Register Problem - Scott_Williams - 13.07.2012

Someone?