SA-MP Forums Archive
i need help - 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: i need help (/showthread.php?tid=323929)



i need help - tyler12 - 07.03.2012

ive posted in script request thread but noone ever checks it and its to big for me to keep watching so...

i need a simple dialog based system where it saves to a .txt file in this format
Код:
 {"Mission Text", UseTrailerCheck, MissionPay, loadx,loady,loadz, unloadx,unloady,unloadz}
i need this ASAP

many thanks

tyler


Re: i need help - Campbell- - 07.03.2012

Well, we're actually in need of some information before we're able to assist you. What should this system do and how should it work? What are these variables saving and what should be saved how later on in the .txt file? Some information would be quite usefull.


Re: i need help - tyler12 - 07.03.2012

in the .txt i shall copy it into the gamemode where all the other missions are stored, this is really just a easier way for me to create them instead of /save


Re: i need help - Campbell- - 07.03.2012

Quote:
Originally Posted by tyler12
Посмотреть сообщение
in the .txt i shall copy it into the gamemode where all the other missions are stored, this is really just a easier way for me to create them instead of /save
So what you mean is that you want to load data from files into variables and save the variables at a certain moment into the file?


Re: i need help - tyler12 - 07.03.2012

Quote:
Originally Posted by Campbell-
Посмотреть сообщение
So what you mean is that you want to load data from files into variables and save the variables at a certain moment into the file?
yes, i need to save a mission name, trailer check (false/true), Missionpay, loadx, loady, loadz, unloadx, unloady, unloadz,

im using truckingmissions.inc


Re: i need help - Campbell- - 07.03.2012

Check the include y_ini here: https://sampforum.blast.hk/showthread.php?tid=175565

You should be able to see how everything works by taking a look at 'Writing' and 'Reading'. It's actually quite easy to realise your plans using y_ini. Once you have problems simply post here as we'll be ready to assist you.


Re: i need help - tyler12 - 07.03.2012

how do i save the input text?


Re: i need help - Campbell- - 07.03.2012

Quote:
Originally Posted by tyler12
Посмотреть сообщение
how do i save the input text?
You're always able to save a string like that, though I don't know if that's what you mean:

pawn Код:
INI_WriteString(ini, "NAME", "******");



Re: i need help - tyler12 - 07.03.2012

Quote:
Originally Posted by Campbell-
Посмотреть сообщение
You're always able to save a string like that, though I don't know if that's what you mean:

pawn Код:
INI_WriteString(ini, "NAME", "******");
when i make it dialog based, how do i save the text i input to the dialog?


Re: i need help - Campbell- - 07.03.2012

Quote:
Originally Posted by tyler12
Посмотреть сообщение
when i make it dialog based, how do i save the text i input to the dialog?
You'll have the text that has been written in the dialog in a variable (OnDialogResponse -> inputtext). Then you'll simply save that variable.

pawn Код:
INI_WriteString(ini, "NAME", inputtext);