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=391114)



Done - Xerli - 09.11.2012

SOLVED>


Re: Register Problem? - YoYo123 - 09.11.2012

You might be missing some folders in the server directory. Show us the register command code.


Re: Register Problem? - Xerli - 09.11.2012

This is the check to see if the player is logged in or not

Код:
//Check to see if they are registered or logged in
	if(udb_Exists(PlayerName(playerid)))
	{
		SendClientMessage(playerid,COLOR_ERROR,"This player name has already been registered. Please login before you spawn.");
		ShowLoginScreen(playerid);
	}
	else
	if(!udb_Exists(PlayerName(playerid)))
	{
		SendClientMessage(playerid,COLOR_ERROR,"This player name has not been registered. You must register before playing.");
		ShowRegisterScreen(playerid);
	}
This is the function to show login screen
Код:
stock ShowLoginScreen(playerid)
{
	new string[128];
    format(string, sizeof(string), "Welcome back %s\nBefore playing you must login\nEnter your password below and click login",PlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login required",string,"Login","Cancel");
}
This is the function to show register screen

Код:
stock ShowRegisterScreen(playerid)
{
    new string[128];
    format(string, sizeof(string), "Welcome to the server %s\nThis server requires you to register an account before playing\nEnter your desired password below then click ok",PlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registration required",string,"Register","Cancel");
}



Re: Register Problem? - Xerli - 09.11.2012

Bump, this is very important.. can't even log in without fixing this.