i need help
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

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?
Reply
#5

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
Reply
#6

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.
Reply
#7

how do i save the input text?
Reply
#8

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", "******");
Reply
#9

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?
Reply
#10

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)