Wrong password bugs up spawn. - 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: Wrong password bugs up spawn. (
/showthread.php?tid=449860)
Wrong password bugs up spawn. -
cloudysky - 10.07.2013
Hey basically if a player enters their password wrong it tells them to try again, however if they then get it right they end up in LV and bypass OnPlayerRequestClass.
Can anyone help me :S
Here is the code where they have to re-enter their password:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_LOGIN:
{
if(!response)
{
SendClientMessage(playerid, COLOUR_RED, "Kick due to: Quitted login");
return Kick(playerid);
}
if(CheckUserLogin(playerid, inputtext))
{
return LoginUser(playerid);
}
else
{
SendClientMessage(playerid, COLOUR_RED, "Wrong {FFFFFF}password, please try again");
return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Type in your password to login", "Login", "Quit");
}
}
Re: Wrong password bugs up spawn. -
cloudysky - 10.07.2013
Sorry, basically when they enter the password wrong, then enter it right (So it takes 2 attempts to log in), it doesnt put the player where they last logged out, instead they end up in LV at the top of the escalators and I dont know how to fix it. I can't see if there is anything wrong with my code when it requests them to retype their password and i cant understand why it bypasses OnPlayerRequestClass, as if it doesnt exist when they finally get the password right.