Saving - 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: Saving (
/showthread.php?tid=324611)
Saving -
DannySnoopy - 10.03.2012
Hello, i have a problem saving an OBject on server restart like /atmcreate, the command works fine it spawns the ATM and all. also /createhouse creates a 3dtextlabel and it's visibale and all, it all saves to scriptfiles/foldier.
But i guess it doesn't read from the foldier on server restart. Help me please +1 rep!!
If a code needed tell me what to post.
Re: Saving -
DannySnoopy - 10.03.2012
sorry for bumping, anyone? help?
Re: Saving -
GNGification - 10.03.2012
add on OnPlayerConnect a function that reads the file
Re: Saving -
CAR - 10.03.2012
You are using dini?
You have to load all the houses at OnGameModeInit() I think.
if the files are stored like: house1.txt, house2.txt, house3.txt etc. then you should use this:
pawn Код:
for(new h; h<MAX_HOUSES; h++) {
new housefile[50];
format(housefile, sizeof(housefile), "house%d.txt", h);
CreateObject(dini_Int(housefile, "objectid"), dini_Float(housefile, "x").....
}
something like that?