07.12.2013, 07:43
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.
I
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; }