SA-MP Forums Archive
How can i change my server's password finder - 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: How can i change my server's password finder (/showthread.php?tid=287491)



How can i change my server's password finder - ModianO - 03.10.2011

Hi guys when someone registers in my server his password is not seen like he typed it is shown like numbers...



that's what is in pawno

pawn Код:
new password2 = num_hash(password);



Re: How can i change my server's password finder - Jafet_Macario - 03.10.2011

Missread.


Re: How can i change my server's password finder - Wesley221 - 03.10.2011

Save the password without using num_hash().


Re: How can i change my server's password finder - ModianO - 03.10.2011

okay thank you


Re: How can i change my server's password finder - ModianO - 03.10.2011

i put new password2 = password; but in compling there is an error saying ("-unkown-")


Re: How can i change my server's password finder - Wesley221 - 03.10.2011

Like Jafet said, show us the piece of code where you register


Re: How can i change my server's password finder - ModianO - 03.10.2011

pawn Код:
if(dialogid == 1244)
        {
            if(response)
            {
                if (gPlayerAccount[playerid] != 0)
                {
                    ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Welcome, Please Log-In","Type your password below to log-in","Log-in","Quit");
                }
                else
                {
                    ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Welcome, Please Register","Type your password below to register a new account.","Register","Quit");
                }
                new y, m, d;
                new h,mi,s;
                getdate(y,m,d);
                gettime(h,mi,s);
                format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has accepted the terms and conditions.",d,m,y,h,mi,s,sendername);
                LoginLog(string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY,"* You selected \"Refuse\", To play you must agree to the terms of condition");
                Kick(playerid);
            }
        }
        if(dialogid == 1245)
        {
            if(response)
            {
                strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
                if(!strcmp(Typed[playerid], "None", true))
                {
                    ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Try Again, Please Login","You didn't typed a password!\nType your password below to Login","Login","Quit");
                }
                else
                {
                    OnPlayerLogin(playerid, inputtext);
                }
            }
            else
            {
                Kick(playerid);
            }
        }
        if(dialogid == 1246)
        {
            if(response == 1)
            {
                if(strlen(inputtext) < 3)
                {
                    ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is Too Short!\nType your password below to register a new account.","Register","Quit");
                    return 1;
                }
                if(strlen(inputtext) > 20)
                {
                    ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is too Long!\nType your password below to register a new account.","Register","Quit");
                    return 1;
                }
                OnPlayerRegister(playerid, inputtext);
            }
            else
            {
                Kick(playerid);
            }
        }



Re: How can i change my server's password finder - Wesley221 - 03.10.2011

OnPlayerRegister(playerid, inputtext);
OnPlayerLogin(playerid, inputtext);
Show both those functions


Re: How can i change my server's password finder - ModianO - 03.10.2011

pawn Код:
forward OnPlayerLogin(playerid,password[]);
forward OnPlayerRegister(playerid, password[]);



Re: How can i change my server's password finder - Wesley221 - 03.10.2011

We cant really do something with that. Show the publics