Dialog vehicle
#1

Few days ago i tried to make a vehicle buying system with dialogs, everything went well but i dont know how to make the cars save, because it just creates a vehicle with CreateVehicle when you buy, i need help how to save them or how to load them on spawn and delete on disconnect or something that's good.
Reply
#2

I'd suggest you to let the cars stay when they disconnect, but about your question, i dont really know >.<
Reply
#3

But when i restart the server , then the cars will disapear and then they have to buy a new one, so i dont know, there has to be a better way.
Reply
#4

edit out the LoadVehiclesFromFile in grandlarc (included with server package) and load them through that, save them in the same file and add some extra's like owner and price or something. (im actually too lazy to do this for you, but this would get you started)
Reply
#5

OK il try something
Reply
#6

Well i got the vehicles loading from .txt file but i need help with saving after buying from dialog,

like it creates a vehicle when buying from dialog , and somehow i dunno it needs to write it to the file

Anybody help?
Reply
#7

There are 2 ways to do this

1st) Save the car stats in the player file so you can load it when he login
2nd) Write the file stats into a txt file at your scriptfiles so you load it when the gamemode starts
Reply
#8

Well , yeh i can do with enums but i dunno how it will load correctly when im not using Dynamic car system
Reply
#9

i Think its easier to load vehicle from file, and save car into file when player bought/spawned
Reply
#10

Check LARP car dealership, This may help you mate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)