Jump to content
shurix

[Release][Taviana] Disable Gas Stations, Damage Vehicles on restart and other scripts

Recommended Posts

I'm working hard on making my player's life very hard and miserable.

 

Please note I don't use BattleEye because I'm running a private server. So any BA filters are yours to add.

 

This is how I disable all auto-fueling on all gas stations.

In init.sqf on each client call another file called vehicle_actioons.sqf

_fuelPump_locations = [[3888.8,7079.71,-0.0704308],[3888.79,7082.39,-0.0704308],[3881.87,7079.7,-0.0704384],[3881.86,7082.39,-0.0704231],[3874.81,7079.56,-0.0704384],[3874.81,7082.55,-0.0704231],[7428.45,4596.29,-0.0704155],[7429.87,4597.94,-0.0704155],[7432.89,4590.98,-0.0704308],[7434.84,4592.93,-0.0704193],[7437.99,4586.2,-0.0704231],[7439.85,4588.13,-0.0704231],[7959.49,4246.67,-0.0641632],[7961.17,4245.27,-0.0641632],[7964.41,4251.73,-0.0641632],[7966.39,4249.81,-0.0641632],[7969.12,4256.82,-0.0641632],[7971.08,4254.99,-0.0641632],[7841.69,3883.56,-0.0704231],[7846.29,3888.82,-0.0704308],[7843.69,3881.77,-0.0704231],[7848.31,3886.94,-0.0704193],[7851.44,3893.45,-0.0704155],[7853.14,3892.08,-0.0704155],[8062.5,6556.21,-0.0698013],[8063.96,6553.95,-0.0698013],[8068.36,6559.91,-0.0697937],[8069.82,6557.65,-0.0697937],[8074.22,6563.68,-0.0698013],[8075.67,6561.42,-0.0698013],[5738.11,8702.44,-0.0620461],[5735.5,8703.08,-0.0620461],[5739.79,8709.16,-0.0620461],[5737.17,8709.8,-0.0620461],[5741.67,8715.96,-0.0620461],[5738.77,8716.68,-0.0620461],[5325.21,8842.28,-0.0704308],[5332.07,8843.3,-0.0704231],[5324.81,8844.94,-0.0704308],[5339.07,8844.16,-0.0704231],[5331.66,8845.96,-0.0704384],[5338.66,8846.82,-0.0704384],[5765.86,9618.7,-0.0685463],[5759.49,9621.73,-0.0685463],[5766.94,9621.16,-0.0685463],[5753.15,9624.54,-0.0685463],[5760.57,9624.19,-0.0685463],[5754.25,9627,-0.0685463],[6679.88,9808.49,-0.0230637],[6682.57,9808.49,-0.0208664],[6679.86,9815.41,-0.0495453],[6682.54,9815.43,-0.0473251],[9512.7,7795.21,-0.0704346],[9514.83,7793.56,-0.0704346],[9516.94,7800.73,-0.0704346],[9519.07,7799.09,-0.0704346],[9521.21,7806.19,-0.0704346],[9523.34,7804.55,-0.0704346],[9786.52,1587.92,-0.045022],[9792.16,1592.17,-0.045022],[9788.41,1585.68,-0.045022],[9797.59,1596.48,-0.045022],[9793.83,1589.98,-0.045023],[9799.25,1594.38,-0.045022],[671.463,804.077,3.83854e-005],[8510,10808.4,-0.0939789],[8508.14,10810.3,-0.0939713],[8515.2,10813.1,-0.0939789],[8513.35,10815.1,-0.0939713],[8520.23,10817.9,-0.0939713],[8518.34,10819.8,-0.0939713],[11792.8,9042.78,-0.0691109],[11795,9041.92,-0.0691109],[11795.5,9049.2,-0.0691109],[11797.6,9048.32,-0.0691109],[11798.1,9055.61,-0.0691118],[11800.3,9054.71,-0.0691109],[11644.8,788.857,-0.0444136],[11644.3,785.913,-0.0444136],[11651.8,787.459,-0.0444136],[11651.3,784.808,-0.0444136],[11658.6,786.251,-0.0444136],[11658.1,783.607,-0.0444136],[11218,10105.6,-0.0543022],[11218,10108,-0.0543022],[11224.9,10105.4,-0.0543022],[11225,10107.7,-0.0543022],[11231.8,10105.1,-0.0543022],[11231.9,10107.5,-0.0543022],[15270.1,7872.65,-0.0960541],[15271.8,7874.22,-0.0960541],[12822.3,12438.6,-0.04105],[12824.7,12438.6,-0.04105],[12822.2,12445.5,-0.04105],[12824.6,12445.5,-0.04105],[12822.2,12452.4,-0.04105],[12824.6,12452.5,-0.04105],[15464.1,9377.74,-0.0704327],[15464.1,9380.42,-0.0704327],[15471,9377.73,-0.0704327],[15471,9380.42,-0.0704327],[15478,9377.79,-0.0704327],[15478,9380.48,-0.0704327],[15133.2,10205.7,-0.0560942],[15135.9,10205.7,-0.0560942],[15133.2,10212.6,-0.0560942],[15135.9,10212.6,-0.0560942],[15132.9,10219.6,-0.0560942],[15135.6,10219.6,-0.0560942],[15701.1,9075.31,-0.0704327],[15701.9,9077.9,-0.0704327],[15707.7,9073.28,-0.0704327],[15703.9,9084.32,-0.0704327],[15708.5,9075.87,-0.0704327],[15704.8,9086.89,-0.0704327],[15714.4,9071.14,-0.0704327],[15710.6,9082.41,-0.0704327],[15715.2,9073.73,-0.0704327],[15711.4,9084.97,-0.0704327],[15717.2,9080.15,-0.0704327],[15718,9082.71,-0.0704327],[13885.5,12371.3,-0.0589409],[13887.6,12370.3,-0.0589409],[13888.5,12377.5,-0.0589409],[13890.6,12376.5,-0.0589409],[11450.7,14973,-0.077179],[11452.8,14971.9,-0.077179],[11454,14979.1,-0.0771713],[11456,14977.9,-0.077179],[11457.3,14985.1,-0.0771561],[11459.4,14984,-0.0771866],[11252.5,15650.2,-0.0771866],[11254.4,15651.5,-0.0771561],[11248.8,15656.1,-0.077179],[11250.7,15657.4,-0.0771713],[11245.1,15661.9,-0.077179],[11247,15663.2,-0.077179],[12494.9,15013.5,-0.0771866],[12490.8,15019.1,-0.077179],[12496.8,15015,-0.0771561],[12486.6,15024.7,-0.077179],[12492.7,15020.5,-0.0771713],[12488.5,15026.1,-0.077179],[17206.5,7659.29,-0.0772247],[17206.5,7661.64,-0.0772247],[17213.4,7659.36,-0.0772247],[17213.4,7661.71,-0.0772247],[17220.4,7659.37,-0.0772247],[17220.3,7661.72,-0.0772247],[12152.8,15536.4,-0.077179],[12155.1,15537,-0.077179],[12151.1,15543.1,-0.0771713],[12153.4,15543.7,-0.077179],[12149.4,15549.9,-0.0771561],[12151.7,15550.5,-0.0771866],[16276.6,11706.3,-0.0771713],[16276.6,11708.7,-0.0771713],[16283.5,11706.3,-0.0771713],[16283.5,11708.6,-0.0771637],[16290.5,11706.2,-0.077179],[16290.5,11708.5,-0.0771484],[10630.5,17323.5,-0.0425072],[10632.3,17325.1,-0.0425072],[10626,17328.7,-0.0425072],[10627.7,17330.3,-0.0425072],[10621.4,17333.9,-0.0425072],[10623.1,17335.5,-0.0425072],[16219.8,13677.6,-0.0771751],[16219.7,13680,-0.0771751],[16226.7,13677.7,-0.0771751],[16226.6,13680.1,-0.0771751],[16233.6,13677.8,-0.0771828],[16233.6,13680.1,-0.0771561],[10842,18943.4,-0.0693188],[10843.9,18944.7,-0.0693188],[10838.2,18949.3,-0.0693188],[10840.2,18950.6,-0.0693192],[10834.4,18955.1,-0.0693188],[10836.4,18956.3,-0.0693188],[15419.4,16091.6,-0.0771713],[15421.2,16090.1,-0.0771713],[15423.9,16096.9,-0.0771637],[15425.7,16095.4,-0.0771713],[15428.4,16102.2,-0.0771484],[15430.2,16100.7,-0.077179]];
diag_log "Start flushing Gas Stations";
systemChat(format["Start flushing Gas Stations"]);
{
	
	_trg=createTrigger["EmptyDetector",_x];
	_trg setTriggerArea[10,10,0,false];
	_trg setTriggerActivation["NONE","PRESENT",false];
	_trg setTriggerStatements["true", "{if ((typeof _x) in ['FuelPump_DZ','Land_A_FuelStation_Feed','Land_Ind_FuelStation_Feed_EP1','Land_FuelStation_Feed_PMC','FuelStation','Land_ibr_FuelStation_Feed','Land_fuelstation_army','Land_fuelstation','land_fuelstation_w','Land_benzina_schnell']) then {_x enableSimulation false; _x allowDamage false; _x setFuelCargo 0;}} forEach nearestObjects [thisTrigger,[],10]", ""]; 
} forEach _fuelPump_locations;
diag_log "Finished flushing Gas Stations";
systemChat(format["Finished flushing Gas Stations"]);	

====================================================================================

 

I also replaced standard teleporting from the box with a map of Altis that teleports player to random locations. This code could be added to the same vehicle_actions.sqf file

	_teleportList = [24470.4,24614.2, 0.23] nearObjects ["MapBoard_altis_F",10];
	{
		_x addAction ["<t color=""#008000"">Take me to Krasnoznamenk Airport Market</t>","custom\teleportMe.sqf",["krasno"],0,false,true,"",""];
		_x addAction ["<t color=""#008000"">Take me to Yaroslavl Airport Market</t>","custom\teleportMe.sqf",["yaroslavl"],0,false,true,"",""];
		_x addAction ["<t color=""#008000"">Take me to Big Island North</t>","custom\teleportMe.sqf",["big_north"],0,false,true,"",""];
		_x addAction ["<t color=""#008000"">Take me to Big Island South</t>","custom\teleportMe.sqf",["big_south"],0,false,true,"",""];
		_x addAction ["<t color=""#008000"">Take me to Small Island</t>","custom\teleportMe.sqf",["small"],0,false,true,"",""];
		_x addAction ["<t color=""#008000"">Take me to Novi Islands</t>","custom\teleportMe.sqf",["novi"],0,false,true,"",""];
		_x addAction ["<t color=""#008000"">Take me to Sector B</t>","custom\teleportMe.sqf",["sector"],0,false,true,"",""];
		_x addAction ["<t color=""#008000"">Take me anywhere (random)</t>","custom\teleportMe.sqf",["random"],0,false,true,"",""];
		_x addAction ["<t color=""#008000"">Take me close to my dead body for 1000 Crypto</t>","custom\teleportMe.sqf",["body"],0,false,true,"",""];
	} forEach _teleportList;

custom\teleportMe.sqf

private ["_position","_teleportType","_price","_errorMsg"];

_teleportType = _this select 3 select 0;
//systemChat(format["Teleporting...%1",_teleportType]);
_price = 1000;
_errorMsg = "";

_position = getPosATL player;

_small_island=[7966,5392,0];
_novi_island=[4326,17023,0];
_big_north=[11309,17905,0];
_big_south=[17205,7153,0];

_center_pos=_position;

_findPos = {
	 private ["_goodPosFound","_height"];
	_position1 = [_center_pos,0,3000,10,0,0,1] call BIS_fnc_findSafePos;
	diag_log format["DEBUG FIND POS::: initial _position=%1",_position1];
	_goodPosNotFound = true;
	while { _goodPosNotFound } do {
		_shortPos = [(_position1 select 0),(_position1 select 1)];
		if (((getTerrainHeightASL _shortPos) > 100)) then
		{
			_position1 = [_center_pos,0,4000,10,0,0,1] call BIS_fnc_findSafePos;
		} else {
			diag_log format["DEBUG FIND POS::: goodPosFound _position=%1",_position1];
			_goodPosNotFound = false;
		};
	};
	_height = 0.1;
	_position = [(_position1 select 0),(_position1 select 1),_height];
	diag_log format["DEBUG FIND POS::: final _position=%1",_position];
	
	_position
 };

switch (_teleportType) do {
		case "random" : {_position = [getMarkerPos "center",0,10000,10,0,1,0] call BIS_fnc_findSafePos;	};
		case "krasno" : { _position = [[6859.07,8190.65,0],0,50,1,0,10,0] call BIS_fnc_findSafePos; };
		case "yaroslavl" : { _position = [[10438.1,18009.6,0],0,50,1,0,10,0] call BIS_fnc_findSafePos; };
		case "big_north" : { _center_pos=_big_north; _position = [] call _findPos; };
		case "big_south" : { _center_pos=_big_south; _position = [] call _findPos; };
		case "small" : { _center_pos=_small_island; _position = [] call _findPos; };
		case "novi" : { _center_pos=_novi_island; _position = [] call _findPos; };
		case "sector" : { _position = [[22053,19143,0],0,50,10,0,10,0] call BIS_fnc_findSafePos; };
		case "body" : {
			if ((EPOCH_playerCrypto-_price) >= 0) then {	
				_DeadPlayer_LIST = [] + allDeadMen;
				//diag_log format["DEBUG::: _DeadPlayer_LIST=%1",_DeadPlayer_LIST];
				for '_i' from 0 to (count _DeadPlayer_LIST)-1 do { 
					_c = _DeadPlayer_LIST select _i;
					_txt = _c getVariable['realname','DEAD'];
					_playername = name player;
					//diag_log format["DEBUG::: realname=%1",_txt];
					if(_txt == _playername) then
					{
						_posBody = getPos _c;
						_position = [_posBody,100,500,10,0,10,0] call BIS_fnc_findSafePos;
						EPOCH_playerCrypto = EPOCH_playerCrypto - _price;
						_errorMsg = "Player body found";
					};
				};
				if (_errorMsg == "") then {
					_errorMsg = 'Cannot find recent players body';
					0 = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _errorMsg], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
				};
			} else {
				_errorMsg = 'Not enough Krypto';
				0 = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _errorMsg], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
			};	
		};
};
if (_errorMsg == "" || _errorMsg == "Player body found") then {
	player setPosATL [(_position select 0),(_position select 1),0.01];
	_errorMsg = 'Player was teleported';
	0 = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _errorMsg], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};


Please note that this script allows you to teleport player close to the player's latest place of death (for 1000 crypto). I also added an ATM machine to the respawn box.

 

=====================================================================

 

To make things realistic I remove gas from and damage every vehicle that contains a Jack tool (since there is no variable that identifies a freshly spawned vehicle). I borrowed the idea from DayZ Epoch with some modifications.

 

In init.sqf you need to pre-define these two functions

if (isServer) then {
	vehicle_getHitpoints =	compile preprocessFileLineNumbers "custom\vehicle_getHitpoints.sqf";
	vehicle_genRandDamage = compile preprocessFileLineNumbers "custom\vehicle_genRandDamage.sqf";

	//server-side vehicle actions
	execVM "\q\addons\custom_server\custom\vehicle_actions_server.sqf"
};

vehicle_getHitpoints.sqf

private ["_cfgHitPoints", "_hps", "_funcGetHitPoints"];
_cfgHitPoints = configFile >> "CfgVehicles" >> (typeOf _this) >> "HitPoints";
_hps = [];

_funcGetHitPoints = 
{
	for "_i" from 0 to ((count _this) - 1) do 
	{
		private ["_hp"];
		_hp = configName (_this select _i);
		
		if (!(_hp in _hps)) then 
		{
			_hps set [count _hps, _hp];
		};
	};
};

//Explore inheritance structure fully
while {(configName _cfgHitPoints) != ""} do 
{
	_cfgHitPoints call _funcGetHitPoints;
	_cfgHitPoints = inheritsFrom _cfgHitPoints;
};

_hps

vehicle_genRandDamage.sqf

// Create randomly damaged parts
_object = _this;	
_totaldam = 0;
_array = [];
_hitpoints = _object call vehicle_getHitpoints;

_DynamicVehicleDamageHigh = 80;
_DynamicVehicleDamageLow = 10;

generate_new_damage = {
	private ["_damage"];
	_damage = ((random(_DynamicVehicleDamageHigh-_DynamicVehicleDamageLow))+_DynamicVehicleDamageLow) / 100;
	_damage;
};


{
	// generate damage on all parts
	_dam = call generate_new_damage;
	_class = typeOf _object;
	_selection = getText(configFile >> "cfgVehicles" >> _class >> "HitPoints" >> _x >> "name");
	
	if (_dam > 0) then {
		//_array set [count _array,[_selection,_dam]];
		_object setHit [_selection, _dam];
		_totaldam = _totaldam + _dam;
	};
	
	//diag_log format["Vehicle %1 is getting %2 damaged to %3",_object,_selection,_dam];
	
} forEach _hitpoints;

_numberOfHitPoints = count _hitpoints;
_totaldam = _totaldam / _numberOfHitPoints;

_object setDamage _totaldam;

//diag_log format["Total Vehicle %1 | Damage is %2",_object,_totaldam];

_object call EPOCH_server_save_vehicle;

vehicle_actions_server.sqf

waitUntil {!isNil "EPOCH_StorageSlotsCount"};

diag_log "Removing fuel and Damaging vehicles containing a Jack Item...";
{
	_vehicle = _x;
	_hasJack = false;
	_hasJack = "JackKit" in (magazineCargo _vehicle);
	if (!isNil "_hasJack") then
	{
		if (_hasJack) then {
			_vehicle setFuel ((random 0.3) MIN 0.1);
			if ((damage _vehicle) < 0.5) then
			{
				//diag_log format["Vehicle %1 is getting random damage",_vehicle];
				_vehicle call vehicle_genRandDamage;
				sleep 0.1;
			};
		};
	};
} forEach (vehicles);
diag_log "Finished removing fuel from vehicles with a Jack Item";


Share this post


Link to post
Share on other sites

Hi shurix

 

Great work. Can I ask you how you _fuelPump_locations ? im trying todo something similar but having issues finding all the ID's of the objects. I am sure there is a way to build the array automatically but I cannot for the life of me remember how :-(

Share this post


Link to post
Share on other sites

instead of creating all these triggers, i belive it would be better to just send them to the clients via publicvariable and have clients set them to 0 on login, also instead of having a giant array of positions that will only work for tavi, you could just search the map for the objects you want, like this:

_objects = nearestObjects [getMarkerPos "center", ['FuelPump_DZ','Land_A_FuelStation_Feed','Land_Ind_FuelStation_Feed_EP1','Land_FuelStation_Feed_PMC','FuelStation','Land_ibr_FuelStation_Feed','Land_fuelstation_army','Land_fuelstation','land_fuelstation_w','Land_benzina_schnell'], 12500];

Share this post


Link to post
Share on other sites

If you are searching for the list of ~300 objects on each server/client load, it will take lots of extra processing time and will not return all of these objects. I've been through that on Altis when some odd fuel pumps were still operational :(

 

I got the script from here http://forums.bistudio.com/showthread.php?172888-Fuel-%28Gas%29-Station-Disable

 

It makes sense to load the script into the editor and add 

copyToClipboard str _arr;

in the end 

 

This is another example how I get nearest map locations using the editor:

_allLocations = nearestLocations [[13999.6,12240.2,0.01],["NameCityCapital","NameCity","Airport","NameVillage","CityCenter","NameMarine","Name","NameLocal"], 500];  _arr = [];  {   _location=_x;   _locationPos= getPos _location;   _locationPos = [(_locationPos select 0),(_locationPos select 1),0.01];   _locName = name _location;   _arr pushBack [_locName,_locationPos];  } foreach _allLocations;  copyToClipboard str _arr;

Share this post


Link to post
Share on other sites

I wrote/hacked the following that works well to build the array for you.  Just load this for one server session to get the array then drop it

_locations = [];
myObjects = nearestObjects [[15440, 15342, 0], ["Land_fs_feed_F" , "Land_FuelStation_Feed_F"], 200000];
{
	diag_log format["PUMPS %2=%1", getPosATL _x, typeOf _x];
	_locations = _locations + [getPosATL _x];
} forEach myObjects;
diag_log format["PUMPS %1",_locations];

Gives you the following. You can then take the last line and job done :-)

..... more just cut out for example.
17:04:34 "PUMPS Land_fs_feed_F=[21230.5,7116.66,0.220314]"
17:04:34 "PUMPS Land_fs_feed_F=[5023.15,14429.5,0.188965]"
17:04:34 "PUMPS Land_fs_feed_F=[5019.57,14436.7,0.273104]"
17:04:34 "PUMPS Land_fs_feed_F=[5768.85,20085.8,0.151474]"
17:04:34 "PUMPS Land_fs_feed_F=[4001.23,12592,0.190384]"
17:04:34 "PUMPS Land_fs_feed_F=[3757.67,13485.9,0.166541]"
17:04:34 "PUMPS Land_fs_feed_F=[3757.27,13477.9,0.231006]"
17:04:34 "PUMPS Land_fs_feed_F=[25701.3,21372.6,0.207424]"

17:04:34 "PUMPS [[16871.6,15476.8,0.236324],[16875.2,15469.5,0.236357],[14173.3,16541.9,0.189812],[15781.1,17453.2,-0.000139236],[15297.2,17565.9,0],[17417.2,13936.8,0.24405],[16751,12513.2,0.23003],[14221.3,18302.6,0.221512],[12028.5,15830,0.250191],[12026.5,15830.1,0.249483],[12024.5,15830,0.249846],[11831.5,14155.8,0.252144],[20784.9,16666,0.242706],[20789.6,16672.4,0.263279],[19961.3,11454.5,0.135704],[19965.1,11447.5,0.236927],[9025.65,15729.4,0.260368],[9023.87,15729,0.260071],[9021.95,15728.7,0.270943],[9205.86,12112.3,0.236019],[8481.81,18260.7,0.261154],[6798.15,15561.5,0.259289],[23379.3,19798.9,0.228766],[6198.93,15081.5,0.195257],[21230.5,7116.66,0.220314],[5023.15,14429.5,0.188965],[5019.57,14436.7,0.273104],[5768.85,20085.8,0.151474],[4001.23,12592,0.190384],[3757.67,13485.9,0.166541],[3757.27,13477.9,0.231006],[25701.3,21372.6,0.207424]]"

Share this post


Link to post
Share on other sites
myObjects = nearestObjects [[15440, 15342, 0], ["Land_fs_feed_F" , "Land_FuelStation_Feed_F"], 200000];

 

you might want to reduce that number on the end or server might lock up while searching and you can set the cords to getMarkerPos "center", so it is same from map to map ...

 

 

 

I wrote/hacked the following that works well to build the array for you.  Just load this for one server session to get the array then drop it

_locations = [];
myObjects = nearestObjects [[15440, 15342, 0], ["Land_fs_feed_F" , "Land_FuelStation_Feed_F"], 200000];
{
	diag_log format["PUMPS %2=%1", getPosATL _x, typeOf _x];
	_locations = _locations + [getPosATL _x];
} forEach myObjects;
diag_log format["PUMPS %1",_locations];

 

we have pushBack now and it is the fastet way to add elements to an array, so:

_locations = [];
myObjects = nearestObjects [[15440, 15342, 0], ["Land_fs_feed_F" , "Land_FuelStation_Feed_F"], 200000];
{
	diag_log format["PUMPS %2=%1", getPosATL _x, typeOf _x];
	_locations pushBack (getPosATL _x);
} forEach myObjects;
diag_log format["PUMPS %1",_locations];

 

If you are searching for the list of ~300 objects on each server/client load, it will take lots of extra processing time and will not return all of these objects. I've been through that on Altis when some odd fuel pumps were still operational :(

 

I got the script from here http://forums.bistudio.com/showthread.php?172888-Fuel-%28Gas%29-Station-Disable

 

It makes sense to load the script into the editor and add 

copyToClipboard str _arr;

in the end 

 

This is another example how I get nearest map locations using the editor:

_allLocations = nearestLocations [[13999.6,12240.2,0.01],["NameCityCapital","NameCity","Airport","NameVillage","CityCenter","NameMarine","Name","NameLocal"], 500];  _arr = [];  {   _location=_x;   _locationPos= getPos _location;   _locationPos = [(_locationPos select 0),(_locationPos select 1),0.01];   _locName = name _location;   _arr pushBack [_locName,_locationPos];  } foreach _allLocations;  copyToClipboard str _arr;

 

i can understand your reluctance to add a search on each server start, however imho it will not be a problem for anyone (unless range/map is ultra-huge), especialy if you can make it more versatile and work for all maps with no changes to the file.

 

the end user is will always fuck it up anyway, so rahter make the script do it correctly.

 

the part you mention about stations not getting drained propper depends on where you put the search center, how far you search and what you search for, the engien will find the object if specified correctly in nearestobjects array.

Share this post


Link to post
Share on other sites

Hi shurix,

 

nice little scripts. In the vehicle_actions_server.sqf, is it possible to at a function, that damage all vehicles without a specific item like jerrycan_epoch for example?

Your script damage vehicles with a specific item.

Share this post


Link to post
Share on other sites

Hi shurix,

 

nice little scripts. In the vehicle_actions_server.sqf, is it possible to at a function, that damage all vehicles without a specific item like jerrycan_epoch for example?

Your script damage vehicles with a specific item.

 

Sure it's possible. Get my script and change it as you like.

Share this post


Link to post
Share on other sites

I love this! I hate how sterile epoch feels right now. Every vehicle is in perfect condition when you find it.. which really takes away from the whole post-apocalypse theme. And I miss vehicle parts, the multi-gun just doesn't do it for me. I want to have to forage for wheels and engine parts again. Felt way more realistic and a lot more fun and challenging of a game.

 

I am going to try to incorporate some of it into my Altis map.

Share this post


Link to post
Share on other sites

Hi shurix,

 

i can´t do scripts, sometimes i change some little parts oft them. It will be nice if you can write the script, that damage all vehicles without a Jackkit for example.

 

Kind regards

 

The script you are asking for would also damage every vehicle already claimed by a player.

Share this post


Link to post
Share on other sites

The script you are asking for would also damage every vehicle already claimed by a player.

Yes this is the plan, we will give these information to the players. We also disabled the gasstation und removed the multigun.

Share this post


Link to post
Share on other sites

Yes this is the plan, we will give these information to the players. We also disabled the gasstation und removed the multigun.

 

So every restart you want people to have to repair previously working vehicles which were parked in their base safely?

 

Good luck keeping players with that script running.

Share this post


Link to post
Share on other sites

So every restart you want people to have to repair previously working vehicles which were parked in their base safely?

 

Good luck keeping players with that script running.

No thats not right. We will inform all players to put a specific item in the vehicle to be save from damage.

Share this post


Link to post
Share on other sites

Hey shurix, quick question.

For this bit of code:

if (isServer) then {
	vehicle_getHitpoints =	compile preprocessFileLineNumbers "custom\vehicle_getHitpoints.sqf";
	vehicle_genRandDamage = compile preprocessFileLineNumbers "custom\vehicle_genRandDamage.sqf";

	//server-side vehicle actions
	execVM "\q\addons\custom_server\custom\vehicle_actions_server.sqf"
};

For vehicle_getHitPoints.sqf and vehicle_genRandDamage.sqf I assume they are added to the pbo, right?

 

But where do I put  vehicle_actions_server.sqf?  Does that go in the mission pbo as well or does that get uploaded to it's own directory in the server root?  I'm unsure how to structure the directory pathway to that file.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...