Posts: 10
Threads: 1
Joined: Feb 2012
Reputation:
0
Hello,
So i want to save and load ingame created objects, they should load on server start and save when ever I place a new object.
Can someone tell me how to do that?
thanks in advance!
Posts: 162
Threads: 3
Joined: Feb 2012
Reputation:
0
Well its not a simple tell you,
There is some basic concepts to know,
Ill try to help
How are you planing to save the data?
You bsicly have three options
Database using mysql
Ini file using yini or dini
Or a raw text file.
If you look at the gl gamemode there is a
Example loading cars from raw files.
To save you should look at the wiki for the file functions,
If your open to any of the ways i can show you how i do it in my GM
Im using. Ycmd, sscanf, file functions from the wiki
to save and load,
Hths
Posts: 10
Threads: 1
Joined: Feb 2012
Reputation:
0
Yes, would be nice. I tried it with file functions before, but i failed. I would appreciate it if you could show and explain.
Posts: 1,849
Threads: 96
Joined: Apr 2010
Reputation:
0
U know what? I just Copied all the CreateObject code's from my GM and made a new include with the name "myobjects". You can save it on notepad by doing /inc extension in the end of the name.
and add #include <myobjects>
Under OnGameModeInIt.
Posts: 10
Threads: 1
Joined: Feb 2012
Reputation:
0
So how i can get the X,Y,Z and the object ID as variable and save/load it.