Jump to content
  • 0

How to set vehicles to unlocked up restart


Buck0

Question

pretty much what title says,

 

im looking for a way to set vehicles to unlocked up restart that are inside safezones

 

doesnt matter if they dont relock untill server restart.

 

theres other scripts but i dont want to delete or tp said vehicles

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

This sets the id to 0 so they will never lock again.

 

server_monitor.sqf

		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));
		};
		
		//Start --- Unlock vehicles at safezones-----------------------------------------------
		{
		if ((_pos distance _x) < 100) then {
			_ownerID = "0";
			};
		} forEach [zonestary, zonebash, zoneklen];
		//End ----------------------------------------------------------------------------------

		if (_damage < 1) then {
			//diag_log format["OBJ: %1 - %2", _idKey,_type];
Link to comment
Share on other sites

  • 0

This will unlock them in a safezone, but allow them to lock next restart. Also deletes damaged vehicles in safezones (credits to maca for the script):

 

Goes in the same spot as above.

{
		if ((_pos distance _x) < 75) then {
			if (_damage > 0.1) then {
				_damage = 1;
				[_idKey,false,"SERVER"] call server_deleteObj;
				diag_log format["DELETING SAFEZONE VEHICLE: %1", [_idKey, _type]];
				};
			_ownerID = "0";
			};
		} forEach [MARKERNAME, MARKERNAME,MARKERNAME];
		
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...