Posts: 211
Threads: 51
Joined: Dec 2008
Reputation:
0
Hi,
i have got a Question. I want some thing for cars. The Cars get created on Server Start.
I Want:
- Car spawns at LSPD you drive to BSN and left. The Car should be there after Server Restart (at bsn). Only when it dies, ot should return to LSPD.
Did anyone have a idea, how to create?
Posts: 211
Threads: 51
Joined: Dec 2008
Reputation:
0
I hope somebody can help me.
I want:
- save car position from all Cars on Server, when the server shuts down.
- If i restart the Server, the cars should respawn at the postion where it was saved before
- if a "died" it should respawn at the original pos (before saving for server restart).
pls help me.
Posts: 211
Threads: 51
Joined: Dec 2008
Reputation:
0
You do not understand me. I know how to create cars, lol.
My problem is:
- To save all vehicle which is not on the position (which is defined by Adddstaticvehicleex on OnGameModeinit) , and it should save in a file, for cars which are moved. That should work when i RESTART the Server.
- When I start my server, alle the cars which are saved, should spawn, at the save coords. I hope you get my Thought.
Posts: 370
Threads: 21
Joined: Jun 2009
Reputation:
0
So you mean, when the server exits, you want the cars to save at the position it was at?
i.e. If I drove a car to LS airport, and parked it there, and for some reason the server closed and restarted, it spawned in the same location, whereas if the car blew up, it would respawn? You mean that?
Posts: 211
Threads: 51
Joined: Dec 2008
Reputation:
0
Yes, exactly. I tried it with OnPlayerExitCar, and saved it to a file, failed. Pls help me, taht would be great.
Posts: 328
Threads: 24
Joined: Jul 2009
Reputation:
0
You need to make something like a car system, which 1 car have a unique id.
I made for my server this:
AddCar(Carid, Carmodel, Carcolor1, Carcolor2, Float:CarX, Float:CarY, Float:CarZ, Float:CarA, CarCost, CarSell)
It creates a fully buyable car, and when you leave the car, its automaticly parked at your position !
Use dini, if you need help pm me or add my email.
Best Regards.