Force Vehicle Save

ihatetn931

Well-Known Member
In scripting how do you force a vehicle to save to the MySQL database, i'm using pwnoz0r server package and I made a repair script but I noticed it doesn't save the fixes to the database, how do I do that so when the script gets called and fixes the vehicle it saves it as well
 
[_objVehicle , _vehicleType] call server_updateObject;
This is for Chernaurus, never messed with scripting for other maps. I assume it's the same.
Works just fine for repairs, salvage, damage, etc... but doesn't seem to work properly if a script moves a vehicle via setPos. Which is the subject of my post from yesterday.
 
Probably not. The items in brackets are a parameter list and you need to pass valid variables from your script to the update call. Replace the object handle with the object handle for your vehicle, and use a valid variable for the vehicle type.

Let's say your vehicle handle is _vehicle. In that case....

_vehicleType = typeOf _vehicle;
[_vehicle , _vehicleType] call server_updateObject;
 
Thank you for the help, it's updating the vehicle in the database sayin it has full health but it reads everything is damaged in game, i'm assuming that it's a bug or somthing with just setting the damage on a vehicle to 0 doesn't get rid of the stuff you need to repair, it's still there just says it has full health. If I repair and everything is red, as soon as a I repair it turns everything green then saves the damge to 0 when I restart everything is back the way it was before I repaired.


_vehicle would be the 1 b 1 correct?

here is how I use my variable, not sure if this is the correct variable

Code:
_velocity = velocity _target;

so my _target would be your _vehicle?

so

Code:
_tvehicle = typeOf _target;
[_target , _tvehicle] call server_updateObject;
 
How _velocity is used other then what is above.

Code:
if ((_velocity select 0 > 1) or (_velocity select 1 > 1) or (_velocity select 2 > 1))

So _target I guess is my vehicle cause when I make it print out what variable is in _target it gives me some 1 b 1 shiznit, I assume that's how dayz handles vehicles instead of by vehicle names.
 
Back
Top