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=479783)
register problem -
gotwarzone - 07.12.2013
Can someone please fix the
else for registering? So if he click Quit button from the dialog registration he will be kicked.
I tried to make it right but I couldn't it just return the dialog registration.
Код:
stock ShowPlayerRegisterDialog(playerid)
{
new string[256];
format(string, sizeof(string), ""white"Welcome to "gold""#SERVER_NAME""white"\n"white"Your name "gold" %s "white"is not registered.\n\nPlease enter a password for your new account:", GetName(playerid), GetName(playerid));
ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_PASSWORD, "Registration", string, "Register", "Quit");
return 1;
}
Код:
case REGISTER_DIALOG :
{
if(strlen(inputtext) < MIN_PASS_LEN || strlen(inputtext) > MAX_PASS_LEN || strlen(inputtext) == 0)
{
GameTextForPlayer(playerid, "~r~Invalid password length", 3000, 3);
ShowPlayerRegisterDialog(playerid);
}
else
{
KickEx(playerid);
}
CreateAccount(playerid, inputtext);
return 1;
}
I
Re: register problem -
Dragonsaurus - 07.12.2013
pawn Код:
case REGISTER_DIALOG :
{
if(!response) return KickEx(playerid);
if(strlen(inputtext) < MIN_PASS_LEN || strlen(inputtext) > MAX_PASS_LEN || strlen(inputtext) == 0)
{
GameTextForPlayer(playerid, "~r~Invalid password length", 3000, 3);
ShowPlayerRegisterDialog(playerid);
}
else CreateAccount(playerid, inputtext);
return 1;
}