Make Deployable Bikes Not Disapears on Server Restart

Donnovan

Member
I have a Deploy Bike script, and when it deploy a bike it set the bike ObjectUID to 1 and its ObjectID also to 1.

1 is the value for objects that does not save on the MySql database? Can i set different ID and UID (not 1) and let the bike save on the database and "survive" a server restart?

Thankyou in advance.
 
in Epoch i use:
Code:
[_vehicle,[(getDir _vehicle),(ASLtoATL getPosASL _vehicle)],(typeOf _vehicle),true,"0"] call server_publishVeh;
 
Nice rockeumel!

This command will put in the MySql database the vehicle stored in _vehicle?

What about this variable _publichVeh at the end? It is set by Epoch itself?
 
"server_publishVeh" is a global function from epoch, to write a vehicle in the database.
"_vehicle" is the local variable that contains the vehicle, that has to be safed in the database.
 
Noob question, but where do I put this?

Code:
[_vehicle,[(getDir _vehicle),(ASLtoATL getPosASL _vehicle)],(typeOf _vehicle),true,"0"] call server_publishVeh;

I wrote a small script for deploying static gun, and would like to be able to save it
 
I'm also a noobie, lets think together.

When you deploy something, you will probably need to create a variable defining the object you is deploying, this is _vehicle, for example.

So you can use this same variable, _vehicle, to put the vehicle in the MySql Database, after the deploy.

Code:
[_vehicle,[(getDir _vehicle),(ASLtoATL getPosASL _vehicle)],(typeOf _vehicle),true,"0"] call server_publishVeh;

Must be other ways to get the "_vehicle" variable like, for example, get it from the object your crosshair is pointing on.

So where you put it, is where on your code you need to write a vehicle in the Database. This line alone do not do much.
 
This line has to be there, where the vehicle was created to safe it.
the function itself you can find in the "dayz_server\compile\server_publishVehicle.sqf"

an example:
Code:
_vehicle = createVehicle ["UralCivil", _position, [], 0, "FORM"];
[_vehicle,[(getDir _vehicle),(ASLtoATL getPosASL _vehicle)],(typeOf _vehicle),true,"0"] call server_publishVeh;
The Ural is created and saved to the database

ps.: the function server_publishVeh exist in epoch, i don't know if it is teh same for normal dayz
 
Back
Top