Jump to content

[Release] Vehicle Service Point (Refuel, Repair, Rearm) [Script]


Axe Cop

Recommended Posts

yes if you do it like my other suggestion it will black list the whole vehicle, if you just want it for ream just add the blacklist condition for the ream section!?

I think every server should at least have one admin who knows a little bit about Arma script, if not you gonna have a hard time with this little tings all the time. at least for DayZ mods :/

Link to comment
Share on other sites

yes if you do it like my other suggestion it will black list the whole vehicle, if you just want it for ream just add the blacklist condition for the ream section!?

I think every server should at least have one admin who knows a little bit about Arma script, if not you gonna have a hard time with this little tings all the time. at least for DayZ mods :/

 

I understand, i am planning to properly learn coding in the next couple of weeks :)

 

Thanks for the help Axe

Link to comment
Share on other sites

Been using this script on my server and it has worked flawlessly until today.

 

I use infistars antihack and I updated it it to their latest build today as well as updating my battle eye filters. I believe the anti hack has caused this to stop working. I can get the menu up logged in as admin for refuel/repair but the players can not.

 

Has anyone else had this problem since infistars last update?

Link to comment
Share on other sites

Hey AC!

 

I modified the script again. These changes will mostly be useful for militarized servers but I think they could be helpful for others as well.  Here are the changes:

 

* Re-arm pilot-gunner vehicles - Now you can re-arm helis and jets.

* Re-arm by ammo type - Now we get the option to re-arm a specific ammo type instead of the default (select 0)

* Block ammo types - Prevent certain ammo types from being re-armed (example is the 192 round s-5 rocket or the 1200 rnd 7.62)

* Block weapon types - Prevent certain weapons from being re-armed (want to block all guided missiles? No problem)

* Multiple magazines for ground units - Only ground units can reload multiple magazines, air units have default behavior

* added new function _fnc_getMagazines - Returns array of all magazines for selected turret

 

You can find the changes on my branch here: https://github.com/deadfred666/dayz/tree/master/service_point

Link to comment
Share on other sites

I have added several of these stations around the map. 

 

I want to add a marker on the map to reveal thier location. 

 

Using this https://community.bistudio.com/wiki/File:Arma2_markers4.jpg

 

I added vehicle repair marker, but its too small on map. Like a tiny dot.

 

Sorry for beign off topic.

 

Sounds like you know a bit about scripting so this is how I did it:

 

markers.sqf

 

// vehicle service points
_marker = createMarker ["Service1", [12383.8,12528.6]];
_marker setMarkerText "Service Point";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorRed";
marker = _Service1;


_marker = createMarker ["Service2", [4450.5,10804.1]];
_marker setMarkerText "Service Point";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorRed";
marker = _Service2;


_marker = createMarker ["Service3", [4679.9,2602.12]];
_marker setMarkerText "Service Point";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorRed";
marker = _Service3;
Link to comment
Share on other sites

 

Sounds like you know a bit about scripting so this is how I did it:

 

markers.sqf

 

// vehicle service points
_marker = createMarker ["Service1", [12383.8,12528.6]];
_marker setMarkerText "Service Point";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorRed";
marker = _Service1;


_marker = createMarker ["Service2", [4450.5,10804.1]];
_marker setMarkerText "Service Point";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorRed";
marker = _Service2;


_marker = createMarker ["Service3", [4679.9,2602.12]];
_marker setMarkerText "Service Point";
_marker setMarkerType "mil_dot";
_marker setMarkerColor "ColorRed";
marker = _Service3;

 

I want to use setMarkerType "vehicleRepair";

 

I have seen it on other servers, but on my server these markers apear very small.

 

I am currently using the dot marker, but I would like to get help using the vehicleRepair marker. I wanna know if this is compatible with dayz or can i change the icon sizes on the map

 

thanks

Link to comment
Share on other sites

Is there an easy way to vastly increase the amount of time it take to repair vehicles?

 

 

In service_point\service_point_repair.sqf

 

Find:

sleep _repairTime;

Replace it with :

sleep 5;

This adds 5 seconds to the repair time. Change it according to your needs.

 

Note: This adds 5 seconds to repair every part.

 

In service_point\service_point.sqf

 

Find: 

_repair_repairTime = 2; // time needed to repair each damaged part (in seconds)

Change the number of seconds you want it to be.

Link to comment
Share on other sites

Hi all,

I have this script working (BIG thx to axcop) but it seems to only rearm with single ammo vehicles like for example the armored SUV?  i tried to rearm the warrior2, which uses 2 kinds of ammo.  it will rearm one type of ammo or the other, but not both types of ammo so their both full?  Is this normal or am I missing something?

 

Thanks

Link to comment
Share on other sites

Hi all,

I have this script working (BIG thx to axcop) but it seems to only rearm with single ammo vehicles like for example the armored SUV?  i tried to rearm the warrior2, which uses 2 kinds of ammo.  it will rearm one type of ammo or the other, but not both types of ammo so their both full?  Is this normal or am I missing something?

 

Thanks

yeah well kinda normal for the default script, because in Epoch vehicles only have 1 type of ammo without any special vehicles.. if you want some improvements for that take a look at http://epochmod.com/forum/index.php?/topic/3935-release-vehicle-service-point-refuel-repair-rearm-script/?p=81039 on this page. :)

Link to comment
Share on other sites

Anybody have a working version with Infistar AH? The instructions to make variables private are too complicated for me? 

 

Any body can share thier code so i can replace it to be compatible with AH?

Link to comment
Share on other sites

Anybody have a working version with Infistar AH? The instructions to make variables private are too complicated for me? 

 

Any body can share thier code so i can replace it to be compatible with AH?

I got this working with infistar without doing anything special at all... Just followed the instructions!

 

But, anyone got a way to implement the payment functionality the traders have?

So you can repair for 2 gold with 1 bc in your inventory, or atleast with a 2oz gold bar and not only 2xgoldbars... I know i can edit the code so it accepts only 1 x 2oz bar aswell, but i want both possibilities! :)

Link to comment
Share on other sites

anyone got a way to implement the payment functionality the traders have?

in the files:

service_point_rearm.sqf

service_point_refuel.sqf

service_point_repair.sqf

 

find the line near the top of each file that reads:

if !([_costs] call player_checkAndRemoveItems) exitWith {};

and replace it with this:

if !([[[_costs select 0, _costs select 1]],0] call epoch_returnChange) exitWith {};
Link to comment
Share on other sites

 

in the files:

service_point_rearm.sqf

service_point_refuel.sqf

service_point_repair.sqf

 

find the line near the top of each file that reads:

if !([_costs] call player_checkAndRemoveItems) exitWith {};

and replace it with this:

if !([[[_costs select 0, _costs select 1]],0] call epoch_returnChange) exitWith {};

 

 

Thanks! I was just about to start working on this fix myself, you saved me some time :)

Link to comment
Share on other sites

Well this is a very simple script I wish to have it but I don't get it to work on Napf, even if I disable my anti-hack. I did exactly what we're supposed to do but If I go to a repair center or gas station I get no option, is there anything we need to do beside adding the script? 

 

I put the code just under the light.

 

 
_serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};
 
if (!isDedicated) then {
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
 
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
 
 
 
//Lights
//[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
 
execVM "service_point\service_point.sqf";
};
 
 
//Custom Loadouts
[] ExecVM "Scripts\loadout.sqf";
 
execVM "Scripts\DRN\DynamicWeatherEffects\DynamicWeatherEffects.sqf";
 
#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf"
 
 
execVM "BTK\Cargo Drop\Start.sqf";
[] execVM "addons\R3F_ARTY_AND_LOG\init.sqf";
Link to comment
Share on other sites

Hello. I can not much English, but in Japanese, thank you. Find the site here, and I want to use on the server automatic lubrication. I As far as reading the description here \ Arma 2 Operation Arrowhead \ MPMissions \ DayZ_Epoch_11.Chernarus Create a folder of service_point here, I put the automatic lubrication spf in the forum here in. And the init 2 Operation Arrowhead \ MPMissions \ DayZ_Epoch_11.Chernarus \ Arma if (isServer) then {[] execVM "service_point \ service_point.sqf"; call compile preprocessFileLineNumbers "\ z \ addons \ dayz_server \ missions \ DayZ_Epoch_11.Chernarus \ dynamic_vehicle.sqf"; / / Compile vehicle configs / / Add trader citys _nil = [] execVM "\ z \ addons \ dayz_server \ missions \ DayZ_Epoch_11.Chernarus \ mission.sqf"; _serverMonitor = [] execVM "\ z \ addons \ dayz_code \ system \ server_monitor.sqf"; }; if (! isDedicated) then {     / / ... Some other stuff ...     / / Add the next line somewhere in this block     execVM "service_point \ service_point.sqf"; / / Conduct map operations 0 fadeSound 0; waitUntil {! isNil "dayz_loadScreenMsg"}; dayz_loadScreenMsg = (localize "STR_AUTHENTICATING"); / / Run the player monitor _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; _playerMonitor = [] execVM "\ z \ addons \ dayz_code \ system \ player_monitor.sqf"; / / Anti Hack [] ExecVM "\ z \ addons \ dayz_code \ system \ antihack.sqf"; / / Lights / / [False, 12] execVM "\ z \ addons \ dayz_code \ compile \ local_lights_init.sqf"; }; if (! isDedicated) then {[] execVM "service_point \ service_point.sqf"; }; if (! isDedicated) then {[] execVM "service_point \ service_point_refuel.sqf"; }; if (! isDedicated) then {[] execVM "\ z \ addons \ dayz_server \ service_point \ service_point.sqf"; }; if (! isDedicated) then {[] execVM "\ z \ addons \ dayz_server \ service_point \ service_point_refuel.sqf"; }; # Include "\ z \ addons \ dayz_code \ system \ REsec.sqf" / / Start Dynamic Weather execVM "\ z \ addons \ dayz_code \ external \ DynamicWeatherEffects.sqf"; # Include "\ z \ addons \ dayz_code \ system \ BIS_Effects \ init.sqf" [] ExecVM "service_point \ service_point.sqf"; [] ExecVM "\ z \ addons \ dayz_server \ service_point \ service_point.sqf"; [] ExecVM "service_point \ service_point.sqf"; [] ExecVM "\ z \ addons \ dayz_server \ service_point \ service_point_refuel.sqf"; And I wrote the code to use the above, but the menu does not even come out you go until gas station playing on your own server. And I have added the code to various similar program because not familiar None did not respond. (Please through programs other than automatic lubrication. I have to write a noob at all,. Because it is not want to touch it except for the time being) I hope you tell me in detail where anywhere in the file and rewrite. Thanks in advance.

Link to comment
Share on other sites

Hi Axe Cop, I've been working with this script today and I can't seem to work this out. I'm trying to get it so people can rearm tanks, jets and other ARMA II vehicles but the only way to rearm them is to hop into the gunners seat and change to that weapon then rearm it but when I rearm one the other drop their ammo, any ideas? Thanks.
 

Is there any way to get it to step through all the weapons on the vehicle and rearm them all?

Link to comment
Share on other sites

There are some limitation to what you can do with scripts, my early tests were extremely buggy when rearming the vehicle weapons if you are not sitting in the turret, that's why I did it this way...

anyway I think there is another solution just go some pages back in this topic there was a nice solution to go at least through the different ammo types of the current weapon. 

Sadly there is many "spam" in this thread with people trying to install the script besides the useful information... :D

 

Also I'm getting sick of explaining the same thing like 10 times in this topic alone why I did it like this.. sorry but I am not even playing Epoch anymore and just helping out a little.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...