update class name in db and in game

hekut146

Well-Known Member
hi, how to release update class name in db and in game, i create server loop (while + waitUntil), but how to select all classnames in db to change to other class name
if at map have object_1
change to
if at map have object_2
change to
object_3
 
Last edited:
Implemented the interchangeable lens session only , without storing in the data base, can not understand how to keep a bunch of data is going , if I say so selected about 10 or more objects at the same time as me all one-time change classname in the database?

P.S. Sorry, write in google translate
 
Sorry, google translate isn't doing well enough. I can't figure out what you are trying to do.
 
I create server script to change class all objects in game every 30 second, script delete all object-1 at map and create object-2 (use derection and coordinates at all object-1) and after 30 second server delete all object-2 at map and create object-3 (use derection and coordinates at all object-2) but i don't know how to save/delete many selected object in database, he (script) changed only local (session(in game))
 
Last edited:
i create deleting in database, but don't work my publish (saving to database) part code|

Code:
_object_1 = nearestObject [player,"object_1"]; 
_ps = getPos _object_1;
_dr = getDir _object_1;
_objectID = _object_1 getVariable["ObjectID","0"];
_objectUID = _object_1 getVariable["ObjectUID","0"];
deleteVehicle _object_1;
[_objectID,_objectUID] call server_deleteObj;
_vh ="object_2" createVehicle _ps;
_vh setDir _dr;
_classname = object_2;
_vh setVariable ["CharacterID",dayz_characterID,true];
PVDZE_obj_Publish =[dayz_characterID,_vh,[_dr,_ps],_classname];
publicVariableServer "PVDZE_obj_Publish";
 
I understand.

You are able to delete the object fine. You cannot add to the database.

This portion is just wrong.
Code:
_vh ="object_2" createVehicle _ps;
_vh setDir _dr;
_classname = object_2;
_vh setVariable ["CharacterID",dayz_characterID,true];
PVDZE_obj_Publish =[dayz_characterID,_vh,[_dr,_ps],_classname];
publicVariableServer "PVDZE_obj_Publish";

Look at the compile/server_publishObject.sqf for reference.

The part you need to do is
Code:
    _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, [], _partsArray, _fuel,_uid];
    diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;

The problem here is when you are done you don't know what ObjectID is for the vehicle. As a result, you can't make the position of the vehicle save. This is a problem for a vehicle, not for a building.
 
need help, need fix last moment
Code:
_object_1 = nearestObjects [_playerPos, ["object_1"], 5];
_object_1_selected = _object_1 select 0;

if ( not isNull _object_1_selected ) then {
have error in if, but don't know how to fix, need create if
if in _object_1_selected have object then {
i write not isNull - not work
 
Not sure what you are asking. Show the entire code segment and what the error is.

Try '!isNull' instead of 'not IsNull'
 
Back
Top