Bliss:Saving Newly Created Vehicles to the DB, almost

what spawn code should i use on clientside to call the vehspawn ?

on xybers pbo there are different spawn files

pls help :)
 
can anyone help me with that i have problems to call the Vehicle Spawn ... only the vehicle appears but not in DB and the Server Log is empty ... so the SaveVehicle Script is not correct called.. and then the Server tried to delete the Vehicle

20:40:16 "Deleting object policecar with invalid ID at pos [3990.77,11681.7,-0.0219727]"


hmm :/
 
BUMP

Did we get this working? also on the 1771 is it possible to just use server_publishObject.sqf to publish new script spawned vehicles to Database? i really need this to complete my motorcycle/quad crafting script?
 
i got it more easily working by using server events + dayz hive write 308
in init
PHP:
"addVehicle" addPublicVariableEventHandler
  {
    private ["_player","_dir","_class","_position","_param"];
    _param = _this select 1;
    _player = _param select 0;
    _class = _param select 1;
    _position = getPosATL _player;
    _charID =    _player getVariable ["characterID","0"];
 
    _worldspace = [
            _dir,
            _position
        ];
    //diag_log ("PUBLISH: Attempt " + str(_object));
    _dir =        _worldspace select 0;
    _location = _worldspace select 1;
 
    _object = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
    _object setdir _dir;
    _object setpos _location;
    _object setVariable ["OwnerID", _charID, true];
 
    //add to database
    dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
 
    //get UID
    _uid = _object call dayz_objectUID;
 
    //Send request
    _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];
    diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;
 
    _object setVariable ["ObjectUID", _uid, true];
 
    diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);
 
 
 
  };

to run it im using something like that :
PHP:
private ["_class"];
args = _this select 3;
veh = args select 0;
vehlist = ["USEC_Maule_M7_STD","USEC_Maule_M7_SKI","DZP_MH6J","HMMWV"]
addVehicle = [player,vehlist [veh]]; publicVariableServer "addVehicle"; //

Has anybody got this running and can give a short how to for dummies? :D
 
Back
Top