Dialog 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 problem... (
/showthread.php?tid=423276)
Dialog problem... -
burnfire - 17.03.2013
Hello.I have a BIG PROBLEM with dialogs.THE PROBLEM:I create an Register Dialog with DIALOG_STYLE_PASSWORD style,but,when I enter on server to register,it appear just like an DIALOG_STYLE_MSGBOX!!!WTF?!?
- The link of image is here
- The code of Dialog and OnDialogResponse is below:
Код:
ShowPlayerDialog(playerid,0,DIALOG_STYLE_PASSWORD,"Register","Te rugam sa te inregistrezi mai jos","Register","Kick");/*The dialog*/
if(dialogid == 0)
{
if(response)
{
new password = inputtext[128];
new string[128];
INI_Open(file);
INI_WriteString(file,"Parola",password);
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,"pName",sizeof(pName));
INI_WriteString(file,"Nume",pName);
INI_WriteInt("Level",PInfo[playerid][level]);
INI_WriteInt("Cash",PInfo[playerid][cash]);
INI_WriteInt("Coins",PInfo[playerid][coins]);
INI_WriteInt("Score",PInfo[playerid][score]);
SendClientMessage(playerid,0x66FF00FF,"Te-ai inregistrat cu succes!!!");
format(string,128,"Te-ai inregistrat cu succes %s cu parola %s !!!",pName,password);
SendClientMessage(playerid,0x66FF00FF,string);
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Nu te-ai inregistrat!Ai primit KICK!!!");
Kick(playerid);
}
}/*OnDialogResponse*/
I know,it's in Romanian,but can you help me?Thanks
P.S:I think to try make again the script with Script Machine...
Re: Dialog problem... -
Denying - 17.03.2013
DIALOG_STYLE_PASSWORD
should be
DIALOG_STYLE_INPUT
Re: Dialog problem... -
burnfire - 17.03.2013
Quote:
Originally Posted by Denying
DIALOG_STYLE_PASSWORD
should be
DIALOG_STYLE_INPUT
|
It works!And thank you.But,I have another problem


.The data isn't writing.You probally say:"You need to create the folders" and I say to you "I created the folders and they are writeable".
P.S:I use YSI:INI file saving system.Can you help me?
Re: Dialog problem... -
Denying - 17.03.2013
I don't know YSI INI functions at all. Sorry I can not help you.
Re: Dialog problem... -
burnfire - 17.03.2013
Quote:
I don't know YSI INI functions at all. Sorry I can not help you.
|
Thanks also for help me with dialog problem.
Can anyone else help me?
Re: Dialog problem... -
Denying - 17.03.2013
Alright, I read some about YSI INI and I think you will need to close the file after finishing writing into it.
And in the INI_WriteString you will need to add the string size at the end, after name. ( I think )
EDIT: Where do you format the directory into 'file'?
Re: Dialog problem... -
burnfire - 17.03.2013
Quote:
Originally Posted by Denying
Alright, I read some about YSI INI and I think you will need to close the file after finishing writing into it.
And in the INI_WriteString you will need to add the string size at the end, after name. ( I think )
EDIT: Where do you format the directory into 'file'?
|
I used an Define:
Код:
#define file "BAdmin/Profiles/%s.ini"
I'll come back with an EDIT.
And with this opportunity you will script better with YSI:INI.So,both learn something.Thanks
EDIT:I try to use SQLite in stead...