09.11.2012, 16:20
(
Последний раз редактировалось Xerli; 09.11.2012 в 19:03.
Причина: Solved.
)
SOLVED>
//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);
}
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");
}
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");
}