SA-MP Forums Archive
Dialog login system 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: Dialog login system problem. (/showthread.php?tid=335882)



Dialog login system problem. - Dan. - 20.04.2012

When login dialog appears, I type in a wrong password and it doesen't log me in. But when I just leave the password spot blank, and click log in, it logs my player into the server. So how to disable this bug?


Re: Dialog login system problem. - RollTi - 20.04.2012

pawn Код:
if(!strval(inputtext) return //code here
this will check if player leaves the dialog blank


Re: Dialog login system problem. - ReneG - 20.04.2012

Quote:
Originally Posted by RollTi
Посмотреть сообщение
pawn Код:
if(!strval(inputtext) return //code here
this will check if player leaves the dialog blank
^^ That won't check if the player leaves the dialog blank, that will only check if he didn't type a number, and the braces aren't even matched.

It's strlen.
pawn Код:
if(!strlen(inputtext))
{
    SendClientMessage(playerid, -1, "You have entered an empty password");
    Kick(playerid);
    return 1;
}