Saving
#1

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

sorry for bumping, anyone? help?
Reply
#3

add on OnPlayerConnect a function that reads the file
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)