Jump to content

ABLGDayZ

Member
  • Posts

    180
  • Joined

  • Last visited

Posts posted by ABLGDayZ

  1. Sup guys,

     

    since the last update it seems my ArmA3 is kinda bugged.

    I can start the game with administrator access but when I try to join a server 

    it says that I need to enable BattlEye. If I accept it tries to restart the game but closes

    directly after saying that the given path doesnt have enough administrator rights to run.

     

    I tried reinstalling BattlEye but it still doesnt work. 

     

    Im german so I try to translate the error the best I can.

     

    "You cant access the given path or data. You may not have enough rights to access 

    this element".

     

    Can someone help me or ran into the same problem?

  2. We shot down a Ghosthawk with 2 Lynx Shots. It may not be comparable to a 7.62 round, but I can assure you that a MK18, Zafir and so on can also take care of big and armored choppers IF you hit them where it hurts the most.

    Try hitting the pilot or disabling the engine/mainrotor, it isn't that hard because these are the only parts you can disable fast.

  3. it needs to be put AFTER the player_monitor.sqf

     

    also I put critical scripts like the humanitychange script in

    [] spawn {
    	waitUntil {!isNil ("PVDZE_plr_LoginRecord")};	//Wait Till logged in
    	waitUntil {(!isNull player) and (alive player) and (player == player)};
    
            [] execVM "custom\changeHumanityClass.sqf";
    };
    

    The second waitUntil could be, what's missing for you. "player" is set in the player_monitor.sqf and the script is called by execVM, so it runs parallel to the following.

    So your humanity script could be executed without the player is set correctly.

     

    Using some more diag_log entries to verify the player or given humanity by getvariable could be helpful to find your issue.

    diag_log format ["Humanity Class Log, Player: %1 Humanity: %2", player, _humanity];
    

    regards

  4. Aren't all this problems with getting kicked, because of the public variable solved if you just not use a public variable? ^^

     

    Please correct me if this is in some way no good.

    But isn't the point of using public variable unnecessary by executing this ONCE for the player object, which should be reskined.

    player setVehicleInit "this setObjectTexture [0, 'gui\upg\admin.jpg'];";
    processInitCommands;
    

    Can be executed on the client pc or on the server, works both.

    So far I am using this on my server for reskinning vehicles and player figures are nothing less than vehicles..

    With this set on the player, everyone currently logged in, also everyone relogging or logging in new will see the new skin. Till now no problems found, at least no one I could backtrack to this script :D.

     

     

    Other way by not changing your way of doing it, just not put the full path of your skin in the public variable, which i think is the cause of the battleye restrictions. Because the path includes not allowed phrases in it, like raymix quoted ;D

    Solution - http://epochmod.com/forum/index.php?/topic/19731-release-10-custom-skin-textures/?p=144115 (read trough it! you could have different line causing this)

     

    Just create an Array beforehand (means like in your variables.sqf) like

    ChangeInSkinArray = [
    "gui\upg\admin.jpg",
    "custom\pics\heavyrocker.paa",
    "some\really\important\SKIN.jpg"
    ];
    

    Change following:

    "PVOZ_adminSkin" addPublicVariableEventHandler {
    		 _obj =  (_this select 1) select 0 ;
    		 _colourNum =  (_this select 1) select 1;	
    	                          _obj setObjectTexture [0, ChangeInSkinArray select _colourNum];
                   	};
    
    {
    _adminated = _x getVariable ["adminated",0];
    if( !isNil "_adminated" &&  _adminated != 0)then{
    _x setObjectTexture [0, _x getVariable "adminatedSkinNum"];
    };
    }forEach playableUnits; // if your antihack doesnt allow this use nearestObjects[player, ["Survivor2_DZ"],25000];
    
    adminskinning = {
    _wantedSkinNum = 0;
    PVOZ_adminSkin  =  [player , _wantedSkinNum];
    publicVariable "PVOZ_adminSkin";
    player setObjectTexture [0, ChangeInSkinArray select _wantedSkinNum]; // (to also see it yourself)
    player setVariable["adminated",1,true];
    player setVariable["adminatedSkinNum",_wantedSkinNum,true];
    };
    

    regards

  5. So our server still isnt visible in the commander anymore. I told everyone to use DayzLauncher but the majority of our player base doesnt seem to find a way to join. We dropped from 25/30+ constant to 10+ players (more in the evening).

    I dont know if this has to do something with people using the commander and not wanting to change, but I think its not caused by our administration..

  6. server_updateobject is a function, which usually only exists on the server, like the name says.

    That's because executing

    PVDZE_veh_Update call server_updateObject;

    will result in an error, the function is not known for the clients.

     

    I myself have not installed zupas Doormanagement yet. But it seems to me it's the original server_updateObject.sqf from the server files.

     

    Just add it to your custom compiles.sqf, which is called in your init.sqf for the CLIENT side stuff.

    Important, add it in the compiles.sqf in this section

    if (!isDedicated) then { .... };

    Also Important, you need to copy the server_updateObject.sqf file from the server files to your Mission.pbo, calling files from the server as client won't success!

     

     

    regards

  7. I can get the vectors working but after a restart they flop back to the normal positions. I've got P4L, Snap 1.4, indestructible building and tried multiple different ways to fix it and tried both the adminbuild version and without.

     

    I saw other people with this problem but didn't see anyone of them get help. Sorry if its an easy fix I just can't seem to find it anywhere at the moment. Any help?

     

    Edit: Is my server monitor right?

     

    private ["_nul","_result","_pos","_wsDone","_dir","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_key","_vehLimit","_hiveResponse","_objectCount","_codeCount","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0","_bQty","_vQty","_BuildingQueue","_objectQueue","_superkey","_shutdown","_res","_hiveLoaded"];
    
    dayz_versionNo = 		getText(configFile >> "CfgMods" >> "DayZ" >> "version");
    dayz_hiveVersionNo = 	getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
    
    _hiveLoaded = false;
    
    waitUntil{initialized}; //means all the functions are now defined
    
    diag_log "HIVE: Starting";
    
    waituntil{isNil "sm_done"}; // prevent server_monitor be called twice (bug during login of the first player)
    	
    // Custom Configs
    if(isnil "MaxVehicleLimit") then {
    	MaxVehicleLimit = 50;
    };
    
    if(isnil "MaxDynamicDebris") then {
    	MaxDynamicDebris = 100;
    };
    if(isnil "MaxAmmoBoxes") then {
    	MaxAmmoBoxes = 3;
    };
    if(isnil "MaxMineVeins") then {
    	MaxMineVeins = 50;
    };
    // Custon Configs End
    
    if (isServer && isNil "sm_done") then {
    
    	serverVehicleCounter = [];
    	_hiveResponse = [];
    
    	for "_i" from 1 to 5 do {
    		diag_log "HIVE: trying to get objects";
    		_key = format["CHILD:302:%1:", dayZ_instance];
    		_hiveResponse = _key call server_hiveReadWrite;  
    		if ((((isnil "_hiveResponse") || {(typeName _hiveResponse != "ARRAY")}) || {((typeName (_hiveResponse select 1)) != "SCALAR")})) then {
    			if ((_hiveResponse select 1) == "Instance already initialized") then {
    				_superkey = profileNamespace getVariable "SUPERKEY";
    				_shutdown = format["CHILD:400:%1:", _superkey];
    				_res = _shutdown call server_hiveReadWrite;
    				diag_log ("HIVE: attempt to kill.. HiveExt response:"+str(_res));
    			} else {
    				diag_log ("HIVE: connection problem... HiveExt response:"+str(_hiveResponse));
    			
    			};
    			_hiveResponse = ["",0];
    		} 
    		else {
    			diag_log ("HIVE: found "+str(_hiveResponse select 1)+" objects" );
    			_i = 99; // break
    		};
    	};
    	
    	_BuildingQueue = [];
    	_objectQueue = [];
    	
    	if ((_hiveResponse select 0) == "ObjectStreamStart") then {
    	
    		// save superkey
    		profileNamespace setVariable ["SUPERKEY",(_hiveResponse select 2)];
    		
    		_hiveLoaded = true;
    	
    		diag_log ("HIVE: Commence Object Streaming...");
    		_key = format["CHILD:302:%1:", dayZ_instance];
    		_objectCount = _hiveResponse select 1;
    		_bQty = 0;
    		_vQty = 0;
    		for "_i" from 1 to _objectCount do {
    			_hiveResponse = _key call server_hiveReadWriteLarge;
    			//diag_log (format["HIVE dbg %1 %2", typeName _hiveResponse, _hiveResponse]);
    			if ((_hiveResponse select 2) isKindOf "ModularItems") then {
    				_BuildingQueue set [_bQty,_hiveResponse];
    				_bQty = _bQty + 1;
    			} else {
    				_objectQueue set [_vQty,_hiveResponse];
    				_vQty = _vQty + 1;
    			};
    		};
    		diag_log ("HIVE: got " + str(_bQty) + " Epoch Objects and " + str(_vQty) + " Vehicles");
    	};
    	
    	// # NOW SPAWN OBJECTS #
    	_totalvehicles = 0;
    	{
    		_idKey = 		_x select 1;
    		_type =			_x select 2;
    		_ownerID = 		_x select 3;
    
    		_worldspace = 	_x select 4;
    		_intentory =	_x select 5;
    		_hitPoints =	_x select 6;
    		_fuel =			_x select 7;
    		_damage = 		_x select 8;
    		
    		_dir = 0;
    
    		
    		_pos = [0,0,0];
    		_wsDone = false;
    		if (count _worldspace >= 2) then
    		{
    			if ((typeName (_worldspace select 0)) == "STRING") then {
    				_worldspace set [0, call compile (_worldspace select 0)];
    				_worldspace set [1, call compile (_worldspace select 1)];
    			};
    			_dir = _worldspace select 0;
    			if (count (_worldspace select 1) == 3) then {
    				_pos = _worldspace select 1;
    				_wsDone = true;
    			}
    		};	
    		
    		if (!_wsDone) then {
    			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
    			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
    			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
    			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
    		};
    		
    		_vector = [[0,0,0],[0,0,0]];
    		_vecExists = false;
    		_ownerPUID = "0";
    		if (count _worldspace >= 3) then{
    			if(count _worldspace == 3) then{
    					if(typename (_worldspace select 2) == "STRING")then{
    						_ownerPUID = _worldspace select 2;
    					}else{
    						 if(typename (_worldspace select 2) == "ARRAY")then{
    							_vector = _worldspace select 2;
    							if(count _vector == 2)then{
    								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
    									_vecExists = true;
    								};
    							};
    						};					
    					};
    					
    			}else{
    				//Was not 3 elements, so check if 4 or more
    				if(count _worldspace == 4) then{
    					if(typename (_worldspace select 3) == "STRING")then{
    						_ownerPUID = _worldspace select 3;
    					}else{
    						if(typename (_worldspace select 2) == "STRING")then{
    							_ownerPUID = _worldspace select 2;
    						};
    					};
    			
    			
    					if(typename (_worldspace select 2) == "ARRAY")then{
    						_vector = _worldspace select 2;
    						if(count _vector == 2)then{
    							if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
    								_vecExists = true;
    							};
    						};
    					}else{
    						if(typename (_worldspace select 3) == "ARRAY")then{
    							_vector = _worldspace select 3;
    							if(count _vector == 2)then{
    								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
    									_vecExists = true;
    								};
    							};
    						};
    					};
    					
    				}else{
    					//More than 3 or 4 elements found
    					//Might add a search for the vector, ownerPUID will equal 0
    				};
    			};
    		};
    		   	   
    		// diag_log format["Server_monitor: [ObjectID = %1]  [ClassID = %2] [_ownerPUID = %3]", _idKey, _type, _ownerPUID];
    		
    		if (_damage < 1) then {
    			//diag_log format["OBJ: %1 - %2", _idKey,_type];
    			
    			//Create it
    			_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
    			_object setVariable ["lastUpdate",time];
    			_object setVariable ["ObjectID", _idKey, true];
    			_object setVariable ["OwnerPUID", _ownerPUID, true];
    			
    			_lockable = 0;
    			if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {
    				_lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable");
    			};
    
    			// fix for leading zero issues on safe codes after restart
    			if (_lockable == 4) then {
    				_codeCount = (count (toArray _ownerID));
    				if(_codeCount == 3) then {
    					_ownerID = format["0%1", _ownerID];
    				};
    				if(_codeCount == 2) then {
    					_ownerID = format["00%1", _ownerID];
    				};
    				if(_codeCount == 1) then {
    					_ownerID = format["000%1", _ownerID];
    				};
    			};
    
    			if (_lockable == 3) then {
    				_codeCount = (count (toArray _ownerID));
    				if(_codeCount == 2) then {
    					_ownerID = format["0%1", _ownerID];
    				};
    				if(_codeCount == 1) then {
    					_ownerID = format["00%1", _ownerID];
    				};
    			};
    
    			_object setVariable ["CharacterID", _ownerID, true];
    			
    			clearWeaponCargoGlobal  _object;
    			clearMagazineCargoGlobal  _object;
    			// _object setVehicleAmmo DZE_vehicleAmmo;
    			
    			_object setdir _dir;
    			
    			if(_vecExists)then{
    				_object setVectorDirAndUp _vector;
    			};
    			
    			_object setposATL _pos;
    			_object setDamage _damage;
    			
    			if ((typeOf _object) in dayz_allowedObjects) then {
    				if (DZE_GodModeBase) then {
    					_object addEventHandler ["HandleDamage", {false}];
    				} else {
    					_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
    				};
    				// Test disabling simulation server side on buildables only.
    				_object enableSimulation false;
    				// used for inplace upgrades && lock/unlock of safe
    				_object setVariable ["OEMPos", _pos, true];
    				
    			};
    
    			if (count _intentory > 0) then {
    				if (_type in DZE_LockedStorage) then {
    					// Fill variables with loot
    					_object setVariable ["WeaponCargo", (_intentory select 0),true];
    					_object setVariable ["MagazineCargo", (_intentory select 1),true];
    					_object setVariable ["BackpackCargo", (_intentory select 2),true];
    				} else {
    
    					//Add weapons
    					_objWpnTypes = (_intentory select 0) select 0;
    					_objWpnQty = (_intentory select 0) select 1;
    					_countr = 0;					
    					{
    						if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
    							_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
    						};
    						_isOK = 	isClass(configFile >> "CfgWeapons" >> _x);
    						if (_isOK) then {
    							_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
    						};
    						_countr = _countr + 1;
    					} count _objWpnTypes; 
    				
    					//Add Magazines
    					_objWpnTypes = (_intentory select 1) select 0;
    					_objWpnQty = (_intentory select 1) select 1;
    					_countr = 0;
    					{
    						if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
    						if (_x == "ItemTent") then { _x = "ItemTentOld" };
    						_isOK = 	isClass(configFile >> "CfgMagazines" >> _x);
    						if (_isOK) then {
    							_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
    						};
    						_countr = _countr + 1;
    					} count _objWpnTypes;
    
    					//Add Backpacks
    					_objWpnTypes = (_intentory select 2) select 0;
    					_objWpnQty = (_intentory select 2) select 1;
    					_countr = 0;
    					{
    						_isOK = 	isClass(configFile >> "CfgVehicles" >> _x);
    						if (_isOK) then {
    							_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
    						};
    						_countr = _countr + 1;
    					} count _objWpnTypes;
    				};
    			};	
    			
    			if (_object isKindOf "AllVehicles") then {
    				{
    					_selection = _x select 0;
    					_dam = _x select 1;
    					if (_selection in dayZ_explosiveParts && _dam > 0.8) then {_dam = 0.8};
    					[_object,_selection,_dam] call object_setFixServer;
    				} count _hitpoints;
    
    				_object setFuel _fuel;
    
    				if (!((typeOf _object) in dayz_allowedObjects)) then {
    					
    					//_object setvelocity [0,0,1];
    					_object call fnc_veh_ResetEH;		
    					
    					if(_ownerID != "0" && !(_object isKindOf "Bicycle")) then {
    						_object setvehiclelock "locked";
    					};
    					
    					_totalvehicles = _totalvehicles + 1;
    
    					// total each vehicle
    					serverVehicleCounter set [count serverVehicleCounter,_type];
    				};
    			};
    
    			//Monitor the object
    			PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
    		};
    	} count (_BuildingQueue + _objectQueue);
    	// # END SPAWN OBJECTS #
    
    	// preload server traders menu data into cache
    	if !(DZE_ConfigTrader) then {
    		{
    			// get tids
    			_traderData = call compile format["menu_%1;",_x];
    			if(!isNil "_traderData") then {
    				{
    					_traderid = _x select 1;
    
    					_retrader = [];
    
    					_key = format["CHILD:399:%1:",_traderid];
    					_data = "HiveEXT" callExtension _key;
    
    					//diag_log "HIVE: Request sent";
    			
    					//Process result
    					_result = call compile format ["%1",_data];
    					_status = _result select 0;
    			
    					if (_status == "ObjectStreamStart") then {
    						_val = _result select 1;
    						//Stream Objects
    						//diag_log ("HIVE: Commence Menu Streaming...");
    						call compile format["ServerTcache_%1 = [];",_traderid];
    						for "_i" from 1 to _val do {
    							_data = "HiveEXT" callExtension _key;
    							_result = call compile format ["%1",_data];
    							call compile format["ServerTcache_%1 set [count ServerTcache_%1,%2]",_traderid,_result];
    							_retrader set [count _retrader,_result];
    						};
    						//diag_log ("HIVE: Streamed " + str(_val) + " objects");
    					};
    
    				} forEach (_traderData select 0);
    			};
    		} forEach serverTraders;
    	};
    
    	if (_hiveLoaded) then {
    		//  spawn_vehicles
    		_vehLimit = MaxVehicleLimit - _totalvehicles;
    		if(_vehLimit > 0) then {
    			diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
    			for "_x" from 1 to _vehLimit do {
    				[] spawn spawn_vehicles;
    			};
    		} else {
    			diag_log "HIVE: Vehicle Spawn limit reached!";
    		};
    	};
    	
    	//  spawn_roadblocks
    	diag_log ("HIVE: Spawning # of Debris: " + str(MaxDynamicDebris));
    	for "_x" from 1 to MaxDynamicDebris do {
    		[] spawn spawn_roadblocks;
    	};
    	//  spawn_ammosupply at server start 1% of roadblocks
    	diag_log ("HIVE: Spawning # of Ammo Boxes: " + str(MaxAmmoBoxes));
    	for "_x" from 1 to MaxAmmoBoxes do {
    		[] spawn spawn_ammosupply;
    	};
    	// call spawning mining veins
    	diag_log ("HIVE: Spawning # of Veins: " + str(MaxMineVeins));
    	for "_x" from 1 to MaxMineVeins do {
    		[] spawn spawn_mineveins;
    	};
    
    	if(isnil "dayz_MapArea") then {
    		dayz_MapArea = 10000;
    	};
    	if(isnil "HeliCrashArea") then {
    		HeliCrashArea = dayz_MapArea / 2;
    	};
    	if(isnil "OldHeliCrash") then {
    		OldHeliCrash = false;
    	};
    
    	// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
    	if(OldHeliCrash) then {
    		_nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', HeliCrashArea, true, false] spawn server_spawnCrashSite;
    	};
    	if (isDedicated) then {
    		// Epoch Events
    		_id = [] spawn server_spawnEvents;
    		// server cleanup
    		[] spawn {
    			private ["_id"];
    			sleep 200; //Sleep Lootcleanup, don't need directly cleanup on startup + fix some performance issues on serverstart
    			waitUntil {!isNil "server_spawnCleanAnimals"};
    			_id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
    		};
    
    		// spawn debug box
    		_debugMarkerPosition = getMarkerPos "respawn_west";
    		_debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1];
    		_vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"];
    		_vehicle_0 setPos _debugMarkerPosition;
    		_vehicle_0 setVariable ["ObjectID","1",true];
    
    		// max number of spawn markers
    		if(isnil "spawnMarkerCount") then {
    			spawnMarkerCount = 10;
    		};
    		actualSpawnMarkerCount = 0;
    		// count valid spawn marker positions
    		for "_i" from 0 to spawnMarkerCount do {
    			if (!([(getMarkerPos format["spawn%1", _i]), [0,0,0]] call BIS_fnc_areEqual)) then {
    				actualSpawnMarkerCount = actualSpawnMarkerCount + 1;
    			} else {
    				// exit since we did not find any further markers
    				_i = spawnMarkerCount + 99;
    			};
    			
    		};
    		diag_log format["Total Number of spawn locations %1", actualSpawnMarkerCount];
    		
    		endLoadingScreen;
    	};
    
    	allowConnection = true;	
    	sm_done = true;
    	publicVariable "sm_done";
    }; 

     

     

    There's not always an "easy" fix for problems like that, because the error could be everywhere. You have to check everything for correctness. Are there any errors in your RPT? Is everything saved correctly in your DB? Because of all your different mods changing the worldspace. Are these correct in the DB, in any way possible, saving through building, upgrading, downgrading...? That's something you have to do for yourself, that's a rather unpleasant side of scripting/programming, but that's what you wanna do here dude ;D...

     

    regards

  8. I have this issue too. Using Build vector with build in snap pro. No p4l or anything related. Taviana map

    Don't know what to look for

     

    Anyone got a fix?

     

     

    Same problem with full cinder walls and cinder garage doorway disappearing after restart. Half cinder blocks walls are fine. I am using the build vectors, snap build pro and plot 4 life.My map is Sauerland. Server_monitor.sqf is correct (with new code).

     

    What should i check there?

     

     

    Check your DB if the Cinder stuff is saved correctly. Check your RPT for errors. You both, could have the same problem like Apraxas. Because, cinder garage doorway and cinder walls all need to be upgraded, check your player_upgrade.sqf, if everythings correctly.

     

    regards

  9. Hi there, 

     

    anyone any clue what the Problem could be here ?

    18:22:35 Error in expression <;
    
    
    _object setVariable ["OEMPos", call compile (_worldspace select 1), true];
    
    >
    18:22:35 Error position: <compile (_worldspace select 1), true];
    
    >
    18:22:35 Error compile: Type Array, expected String
    18:22:35 File z\addons\dayz_server\compile\server_swapObject.sqf, line 52

    by looking into z\addons\dayz_server\compile\server_swapObject.sqf

    // Publish variables
    _object setVariable ["CharacterID",_charID,true];
    		
    //_object setVariable ["ObjectUID",_objectUID,true];
    _object setVariable ["OEMPos", call compile (_worldspace select 1), true];
    
    //diag_log ("PUBLISH: Attempt " + str(_object));
    
    //get UID
    

    this is only happening when upgrading ... ( doors, cinderblockwalls, and so on ) and they dont get stored into the DB.

     

    The problem here is the call compile, which expects a string.

    You probably have installed another script, which changes the build-files?! Which changes the worldspace to a string, like the Precise Base Building.

    But in your player_upgrade.sqf you have the normal Array-Version of the Worldspace Location and commit it as array to your server_swapObject, i would suspect.

     

    They are not saved in the DB, because the saving is located after the error line, so it's not executed.

     

    regards

  10. Ok, so I did what is says to do here to prevent certain items from being rotated: 

     

    I have this in my init: DZE_noRotate = ["ItemVault","ItemWoodStairs","ItemLockbox","ItemWoodStairsSupport","ItemWoodLadder","30m_plot_kit","workbench_kit"];

     

    I can still rotate ladders and I assume the other items too. What am I doing wrong?

     

     

    You used the ITEM names. You need to use the object name, like "VaultStorageLocked","LockboxStorageLocked", etc.

     

    regards

  11. @striker

    So finally^^, sorry for the late reply, had stuff to do.

     

    Here's my Menu, with the features you mentioned.

     

    The snapVectorMenu.sqf

    if (isNil "SnapVectorBuildCallbackFunc") then {
    	SnapVectorBuildPitchMenuArrays = [
    		["Reset",[],"",-5,[["expression","SnapVectorBuildSetPitchInProgress = true; ['reset'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; SnapVectorBuildPitchMenuFirstOne = 0; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    		["Pitch Forward",[],"",-5,[["expression","SnapVectorBuildSetPitchInProgress = true; ['forward'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; SnapVectorBuildPitchMenuFirstOne = 1; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    		["Pitch Back",[],"",-5,[["expression","SnapVectorBuildSetPitchInProgress = true; ['back'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; SnapVectorBuildPitchMenuFirstOne = 2; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    		["Pitch Left",[],"",-5,[["expression","SnapVectorBuildSetPitchInProgress = true; ['left'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; SnapVectorBuildPitchMenuFirstOne = 3; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    		["Pitch Right",[],"",-5,[["expression","SnapVectorBuildSetPitchInProgress = true; ['right'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; SnapVectorBuildPitchMenuFirstOne = 4; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"]
    	];
    	
    	SnapVectorBuildSnappingFunc = {
    		["","","",[_this select 0, SnapVectorBuildSnapArray select 0, SnapVectorBuildSnapArray select 1, SnapVectorBuildSnapArray select 2, _this select 1]] spawn snap_build;
    	};
    
    	SnapVectorBuildCallbackFunc = {
    		switch (_this select 0) do {
    			case "Pitch" : {
    				waitUntil { !SnapVectorBuildSetPitchInProgress && !SnapVectorBuildVectorChangeInProgress };
    				
    				SnapVectorBuildPitchMenu = 
    				[
    				["",true],
    					["-- Pitch Object Menu --", [],  "", -2, [["expression", ""]], "1", "0"],
    					[format ["-- Cur Pitch %1 --", DZE_curPitch], [],  "", -2, [["expression", ""]], "1", "0"]
    				];
    				
    				SnapVectorBuildPitchMenu = SnapVectorBuildPitchMenu + [SnapVectorBuildPitchMenuArrays select SnapVectorBuildPitchMenuFirstOne];
    				
    				for "_y" from 0 to (count SnapVectorBuildPitchMenuArrays) - 1 do {
    					if (_y != SnapVectorBuildPitchMenuFirstOne) then { SnapVectorBuildPitchMenu = SnapVectorBuildPitchMenu + [SnapVectorBuildPitchMenuArrays select _y]; };
    				};
    				
    				SnapVectorBuildPitchMenu = SnapVectorBuildPitchMenu + [
    					["", [], "", -5, [["expression", ""]], "1", "0"],
    					["Set Pitch Degree Menu >>", [], "", -5, [["expression", "['SetDegree'] spawn SnapVectorBuildCallbackFunc;"]], "1", "1"],
    					["Select Snapping Menu >>", [], "", -5, [["expression", "['SelectSnap'] spawn SnapVectorBuildCallbackFunc;"]], "1", "1"],
    					["", [], "", -5, [["expression", ""]], "1", "0"],
    					["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
    				];
    			
    				showCommandingMenu "#USER:SnapVectorBuildPitchMenu";
    			};
    			case "SetDegree" : {
    				waitUntil { !SnapVectorBuildVectorChangeInProgress };
    				
    				SnapVectorBuildSetDegreeMenu = 
    				[
    				["",true],
    					["-- Set Pitch Degree Menu --", [],  "", -2, [["expression", ""]], "1", "0"],
    					[format ["-- Cur Pitch %1 --", DZE_curPitch], [],  "", -2, [["expression", ""]], "1", "0"],
    					["Set to 1 degree",[],"",-5,[["expression","SnapVectorBuildVectorChangeInProgress = true; ['1'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    					["Set to 5 degree",[],"",-5,[["expression","SnapVectorBuildVectorChangeInProgress = true; ['5'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    					["Set to 15 degree",[],"",-5,[["expression","SnapVectorBuildVectorChangeInProgress = true; ['15'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    					["Set to 30 degree",[],"",-5,[["expression","SnapVectorBuildVectorChangeInProgress = true; ['30'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    					["Set to 45 degree",[],"",-5,[["expression","SnapVectorBuildVectorChangeInProgress = true; ['45'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    					["Set to 90 degree",[],"",-5,[["expression","SnapVectorBuildVectorChangeInProgress = true; ['90'] execVM 'scripts\snapBuild\player_vectorChange.sqf'; ['Pitch'] spawn SnapVectorBuildCallbackFunc;"]],"1","1"],
    						["", [], "", -5, [["expression", ""]], "1", "0"],
    						["Pitch Object Menu >>", [], "", -5, [["expression", "['Pitch'] spawn SnapVectorBuildCallbackFunc;"]], "1", "1"],
    						["Select Snapping Menu >>", [], "", -5, [["expression", "['SelectSnap'] spawn SnapVectorBuildCallbackFunc;"]], "1", "1"],
    						["", [], "", -5, [["expression", ""]], "1", "0"],
    						["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
    				];
    				
    				showCommandingMenu "#USER:SnapVectorBuildSetDegreeMenu";
    			};
    			case "SelectSnap" : {
    				private ["_cnt","_snapShow"];
    				waitUntil { !SnapVectorBuildSnapBuildInProgress };
    				
    				_snapShow = "OFF";
    
    				if (snapActionState == "ON" || snapActionState == "Auto" || snapActionState == "Manual" || snapActionState == "Selected") then { _snapShow = "ON"; };
    				
    				SnapVectorBuildSnappingMenu =
    				[
    				["",true],
    					["-- Select Snapping Menu --", [],  "", -2, [["expression", ""]], "1", "0"],
    					[format ["Snap: %1",_snapShow], [], "", -5, [["expression", format ["SnapVectorBuildSnapBuildInProgress = true; ['%1',-1] spawn SnapVectorBuildSnappingFunc; ['SelectSnap'] spawn SnapVectorBuildCallbackFunc;", _snapShow]]], "1", "1"]
    				];
    				
    				if (_snapShow == "ON") then {
    					SnapVectorBuildSnappingMenu = SnapVectorBuildSnappingMenu + [
    						[format ["Snap Point: %1",snapActionStateSelect], [], "", -5, [["expression", format ["SnapVectorBuildSnapBuildInProgress = true; ['%1',-1] spawn SnapVectorBuildSnappingFunc; ['SelectSnap'] spawn SnapVectorBuildCallbackFunc;", snapActionStateSelect]]], "1", "1"]
    					];
    				};
    				
    				if (snapActionStateSelect == "Manual" && _snapShow == "ON") then {
    					_cnt = 0;
    					{
    						SnapVectorBuildSnappingMenu = SnapVectorBuildSnappingMenu + [
    							[format ["%1)Select: %2",_cnt,_x select 3], [], "", -5, [["expression", format ["SnapVectorBuildSnapBuildInProgress = true; ['Selected',%1] spawn SnapVectorBuildSnappingFunc; ['SelectSnap'] spawn SnapVectorBuildCallbackFunc;", _cnt]]], "1", "1"]
    						];
    						_cnt = _cnt+1;
    					} count ([] + (getArray (missionConfigFile >> "SnapBuilding" >> (SnapVectorBuildSnapArray select 1) >> "points")));
    				};
    				
    				SnapVectorBuildSnappingMenu = SnapVectorBuildSnappingMenu + [
    					["", [], "", -5, [["expression", ""]], "1", "0"],
    						["Pitch Object Menu >>", [], "", -5, [["expression", "['Pitch'] spawn SnapVectorBuildCallbackFunc;"]], "1", "1"],
    						["Set Pitch Degree Menu >>", [], "", -5, [["expression", "['SetDegree'] spawn SnapVectorBuildCallbackFunc;"]], "1", "1"],
    						["", [], "", -5, [["expression", ""]], "1", "0"],
    						["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
    				];
    			
    				showCommandingMenu "#USER:SnapVectorBuildSnappingMenu";
    			};
    		};
    	};
    };
    
    SnapVectorBuildPitchMenuFirstOne = 0;
    
    SnapVectorBuildSnapArray = (_this select 3) select 1;
    
    [(_this select 3) select 0] spawn SnapVectorBuildCallbackFunc;
    

     

    In player_build.sqf add these two Addaction Menus:

    s_player_setVectorsPitch = player addaction ["Open Pitch Menu >>","scripts\snapBuild\snapVectorMenu.sqf",["Pitch",[_object,_classname,_objectHelper]],3,false,false];
    s_player_setVectorsSetDegree = player addaction ["Open Set Degree Menu >>","scripts\snapBuild\snapVectorMenu.sqf",["SetDegree",[_object,_classname,_objectHelper]],3,false,false];
    

    My player_vectorChange.sqf

    private ["_type"];
    SnapVectorBuildVectorChangeInProgress = true;	//NEW
    
    _type = _this select 0;	//NEW
    
    switch(_type) do{
    	case "reset":
    	{
    		DZE_memForBack = 0;
    		DZE_memLeftRight = 0;
    		DZE_updateVec = true;
    	};
    	case "forward":
    	{
    		DZE_updateVec = true;
    		DZE_memForBack = DZE_memForBack + (DZE_curPitch * -1);
    
    	};
    	case "back":
    	{
    		DZE_updateVec = true;
    		DZE_memForBack = DZE_memForBack + DZE_curPitch;
    
    	};
    	case "left":
    	{
    		DZE_updateVec = true;
    		DZE_memLeftRight = DZE_memLeftRight + (DZE_curPitch * -1);
    
    	};
    	case "right":
    	{
    		DZE_updateVec = true;
    		DZE_memLeftRight = DZE_memLeftRight + DZE_curPitch;
    
    	};
    	case "1":
    	{
    		DZE_curPitch = 1;
    	};
    	case "5":
    	{
    		DZE_curPitch = 5;
    	};
    	//NEW
    	case "15":
    	{
    		DZE_curPitch = 15;
    	};
    	case "30":
    	{
    		DZE_curPitch = 30;
    	};
    	case "45":
    	{
    		DZE_curPitch = 45;
    	};
    	//NEW
    	case "90":
    	{
    		DZE_curPitch = 90;
    	};
    };
    
    SnapVectorBuildVectorChangeInProgress = false;	//NEW
    

     

    And in the snap_build.sqf change the following:

    Right below the private command at the top add this

    SnapVectorBuildSnapBuildInProgress = true;
    

    Now further down to the bottom.

    Change this

    [] spawn {
            while {true} do {
                if(!DZE_ActionInProgress || DZE_cancelBuilding) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";};
                sleep 2;
                };
            };
    

    to this

    [] spawn {
    	while {true} do {
    		if(!DZE_ActionInProgress) exitWith { call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF"; showCommandingMenu ""; };	//NEW
    		sleep 2;
    	};
    };
    

    In the case "OFF" statement add this

    SnapVectorBuildSnapBuildInProgress = false;	//NEW
    

    right below

    [1,1,0] call fnc_snapActionCleanup;
    

    And finally add this

    SnapVectorBuildSnapBuildInProgress = false;	//NEW
    

    right at the bottom of the file.

     

     

    I'm aware of the feature of addAction commands, with the hideOnUse = false. But I like it more, when you have different sub-menus for each action.

     

    I had to add these variables to each file, so that the menu would wait till the action of each file is done, otherwise the changed degree numbers wouldn't directly be shown.

    Plus activating the pitch action too quickly several times, could cause issues, i think.

    Thats also what could most likely happen with the addAction menus, because with the hideOnUse = false option, you can press these actions really fast after each other... What would cause some issues especially for the pitching action.

     

    Let me know, when you find any issues or have some suggestions for improvement.

     

    regards

  12.  

    I never wrote anything of problems with this script itself. I wrote from a problem with the AI with using skins of this script. 

     

    But well done, i finally figured it out !

     

    player_switchModel.sqf:

     

    change:

    /**********************************/
    //DONT USE player AFTER THIS POINT//
    /**********************************/
    _group = createGroup west;
    _newUnit = _group createUnit [_class,dayz_spawnPos,[],0,"NONE"];
    _newUnit setPosATL _position;
    _newUnit setDir _dir;

    to this:

    /**********************************/
    //DONT USE player AFTER THIS POINT//
    /**********************************/
    _group = createGroup WEST;
    _newUnit = _group createUnit [_class,dayz_spawnPos,[],0,"NONE"];
    _newUnit setPosATL _position;
    _newUnit setDir _dir;
    [_newUnit] joinSilent createGroup WEST;

     

    That's what I searched for the last 3 hours, thanks!^^

     

    Had the same problem with AI not shooting and players couldn't get in a vehicle together.

     

    But you better use this

    [_newUnit] joinSilent _group;
    

    Each side can only have 144 groups and you would create 2 groups for each player and only one group is deleted, when this player dies or changes the clothes. After some deaths and changing clothes the side would be full and couldn't let the new players join in, whitout giving any error report. Don't know what would happen then, but could believe AI would stop shooting again?

     

    regards

  13. Hi,

    did anyone notice, that the player won't be able to choose chemlights and roadflares as weapons anymore, with pressing F-Key?

    After executing the removeAllWeapons command.

     

    Solution, add this at the end:

    player addWeapon "Loot";
    player addWeapon "Flare";
    

    These are the "core tools", like it's called in the player_monitor.fsm.

     

    regards

×
×
  • Create New...