[HELP]Password Security
#1

how change this .. if you type the password will appear "********************" instead of text

pawn Код:
ShowMainMenuDialog(playerid, frame)
{
    new titlestring[64];
    new string[256];

    switch(frame)
    {
        case 1:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "Welcome to, %s.\n\nIP Address: *<*<*<*<*<*<*<\n\nbla bla, bla bla bla:", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,titlestring,string,"Login","Cancel");
        }
        case 2:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Daftar - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "Welcome to, %s.\n\nIP Address: %s\n\nbla bla bla bla:", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_INPUT,titlestring,string,"Register","Cancel");
        }
        case 3:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "bla bla!\n\nbla bla, %s.\n\nIP Address: %s\n\nbla bla bla bla bla:", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,titlestring,string,"Login","Cancel");
        }
    }
}
if you type the password will appear "********************" instead of text

Please help me
Reply
#2

Change DIALOG_STYLE_INPUT to DIALOG_STYLE_PASSWORD

Have in mind this only works in 0.3d
Reply
#3

Why would you want that ? Only the client can see what pass is being typed. Unless you got people looking over your shoulder that is.
Reply
#4

Quote:
Originally Posted by Johndaonee
Посмотреть сообщение
Change DIALOG_STYLE_INPUT to DIALOG_STYLE_PASSWORD

Have in mind this only works in 0.3d
Is it only in 0.3d? At approximately 0.3c does not work?

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Why would you want that ? Only the client can see what pass is being typed. Unless you got people looking over your shoulder that is.
Because my clients an average of play on the Public Internet. So that clients can feel safe, can you please help me??
Reply
#5

DIALOG_STYLE_PASSWORD is a feature of 0.3d, it will not work on 0.3c and as far as I know, there is no other way of implementing it in 0.3c.
Reply
#6

Do you want to hide it in the input, or hide it in a message?
Reply
#7

Quote:
Originally Posted by JamesC
Посмотреть сообщение
DIALOG_STYLE_PASSWORD is a feature of 0.3d, it will not work on 0.3c and as far as I know, there is no other way of implementing it in 0.3c.
oh okai thanks

Quote:
Originally Posted by MP2
Посмотреть сообщение
Do you want to hide it in the input, or hide it in a message?
hide the message ..
Reply
#8

This is how I do it on my server:

pawn Код:
// An array called 'password' stores their password

// Hide password
new pass[51]="**************************************************"; // Increase the size of the array + add more stars if you allow longer passwords
// make sure there are 1 less stars than the size of the array (there are 50 in that 51 cell array)
new first[2];
strmid(first, password, 0, 1);
format(pass, 51, "%s%s%s",first,pass[(52-strlen(password))], password[strlen(password)-1]);
// 'pass' is the string with the hidden password in
It would turn 'password' in to 'p******d'
Reply
#9

Here's what u do in this edit what i did
ShowMainMenuDialog(playerid, frame)
{
new titlestring[64];
new string[256];

switch(frame)
{
case 1:
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "Welcome to, %s.\n\nIP Address: *******<\n\nbla bla, bla bla bla:", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_IN PUT,titlestring,string,"Login","Cancel");
}
case 2:
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Daftar - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "Welcome to, %s.\n\nIP Address: %s\n\nbla bla bla bla:", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_I NPUT,titlestring,string,"Register","Cancel");
}
case 3:
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "bla bla!\n\nbla bla, %s.\n\nIP Address: %s\n\nbla bla bla bla bla:", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_IN PUT,titlestring,string,"OK","Cancel");
}
}
Reply
#10

You are better off waiting for 0.3d or just placing a textdraw over the password
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)