How to index this?
#1

Hello,

I'm my RP server, I have a register system with dini and it uses
a udb_hash password but i want to change it to normal password.
I mean it reads from the dini user file and it needs to check the
inputtext[], i made it with Dialogs. This is the new script that I
made:

Код:
new tmp;
        tmp = dini_Int(file, "Password");
        if(inputtext != tmp) {
            SendClientMessage(playerid, COLOR_DRED, "[ ! ] You have entered a wrong password, repeating attempts will get you IP-Banned.");
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Welcome back, please enter your password below to login.", "Login", "Cancel");
        }
but it needs to be indexed.. I used inputtext[64] etc.. nothing works..
What's the best way to make this?

K. Regards,
I. C.
Reply
#2

Uhm... Shouldn't you be using "dini_Get" ?
Reply
#3

TextDrawShowForPlayer(playerid, BOX);
TextDrawShowForPlayer(playerid, Welcome);
TextDrawShowForPlayer(playerid, text1);
TextDrawShowForPlayer(playerid, text2);
TextDrawShowForPlayer(playerid, text3);
HaveTicket[playerid] = false;
new Registre[250];
format(file, sizeof(file), "%s.runix", playername);
if(fexist(file))
{
GetPlayerName(playerid,playername,MAX_PLAYER_NAME) ;
format(Registre,sizeof(Registre),"Welcome back %s!\n\nPlease Login to continue!",playername);
ShowPlayerDialog(playerid,LoginName,DIALOG_STYLE_I NPUT,"Login",Registre,"Login","Cancel");
}
else
if(!fexist(file))
{
GetPlayerName(playerid,playername,MAX_PLAYER_NAME) ;
format(Registre,sizeof(Registre),"Welcome %s!\n\nPlease register to continue!",playername);
ShowPlayerDialog(playerid,RegisterName,DIALOG_STYL E_INPUT,"Register",Registre,"Register","Cancel");
}
return true;
}

You can use that if you need to.
I don't know if it would help you any lol
Reply
#4

Quote:
Originally Posted by Gabe
Посмотреть сообщение
Uhm... Shouldn't you be using "dini_Get" ?
No, that doesn't work... It wouldn't work though..
It needs to use the inputtext, because it's a dialog, otherwise the dialog
ain't know what the user inputs. So, anyone else who can help me?

PS: Thanks for your try!
Reply
#5

Quote:
Originally Posted by Ihsan-Cingisiz
Посмотреть сообщение
No, that doesn't work... It wouldn't work though..
It needs to use the inputtext, because it's a dialog, otherwise the dialog
ain't know what the user inputs. So, anyone else who can help me?

PS: Thanks for your try!
:P I solved it already, this is what i did:

Код:
new tmp;
        tmp = dini_Int(file, "Password");
        if(tmp != strval(inputtext))
		{
            SendClientMessage(playerid, COLOR_DRED, "[ ! ] You have entered a wrong password, repeating attempts will get you IP-Banned.");
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Diamond Roleplay - Login", "Welcome back, please enter your password below to login.", "Login", "Cancel");
        }
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)