Jump to content

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


Axe Cop

Recommended Posts

I was wondering if it's possible to change the re-arm station to a unique building? I would like to add just one to my server to creat a bit of a risk for going there.

Also can I add a timer to the re-arm procedure, make it take 60-120 seconds to rearm?

Link to comment
Share on other sites

I was wondering if it's possible to change the re-arm station to a unique building? I would like to add just one to my server to creat a bit of a risk for going there.

Also can I add a timer to the re-arm procedure, make it take 60-120 seconds to rearm?

it should work with almost any house/object, see my comment in the script:

 

 

_servicePointClasses = dayz_fuelpumparray; // service point classes (can be house, vehicle and unit classes)

use it like this to customize the classes

_servicePointClasses = ["class_name", "another_class_name"];

and for the timer, you could add a countdown or something before the ream procedure, but the reaming itself cannot be slowed down I think.

Link to comment
Share on other sites

Thanks Axe, do I add: _servicePointClasses = ["class_name", "another_class_name"];

After: _servicePointClasses = dayz_fuelpumparray; // service point classes (can be house, vehicle and unit classes)

you should just replace the line, it is the same variable name "_servicePointClasses" so only the last line will be used anyways. :)

Link to comment
Share on other sites

I removed the AH and set everything up as in the OP and it still doesn't come up, even moved the init line around like someone recommended for 112555 / 1.0.5.1, any more ideas Axe?

well if you see nothing the next step would be to check if the script is actually running your client (not server), to do that you can add a debug line to the script so it will print some text to the report file and you see at least if the service_point.sqf is called at all.

 

just add a log line like this at the very first line of the service_point.sqf

diag_log "service point script started";

and you should see that message "service point script started" in your client's report log whenever you connect to a server with that script, if not the service_point.sqf is not started properly from your init.sqf.

Link to comment
Share on other sites

hey axe cop, like the script just one problem, ive set the rearm to 5 10oz gold but it will only take the gold if separate from a briefcase, is there a way for it to take the gold straight from a bc like a vendor?

 

cheers  :)

yeah I think that has been answered multiple times in this thread, when I wrote this script there was no function like that in Epoch, so I had to do it like it was in Epoch at that time., don't know if it can be easily adapted now since I don't play Epoch at the moment and didn't look ath the current code.. but I believe someone has posted a solution if you want it like at the vendors.. any scripter with a little knowledge can change the code to do what you want but I don't have the time for that currently.

Link to comment
Share on other sites

How can I do it so only air vehicles can use the refuel?

 

Also if i disable the rearm and repair, can I delete them files to save on mission filesize?

with the current config options you can't do that, you can only set different costs for different vehicle (types), but if you onyl want air vehicles to use the refuel option at all you can change the script a little

in line 144 change

if (SP_refuel_action < 0 && _refuel_enable) then {

to

if ((_vehicle isKindOf "Air") && SP_refuel_action < 0 && _refuel_enable) then {

that should add a check so the menu will only appear for air" vehicles.

 

and yes you can just delete the other script files if you don't use repair and ream, not that they are very large :)

Link to comment
Share on other sites

well if you see nothing the next step would be to check if the script is actually running your client (not server), to do that you can add a debug line to the script so it will print some text to the report file and you see at least if the service_point.sqf is called at all.

 

just add a log line like this at the very first line of the service_point.sqf

diag_log "service point script started";

and you should see that message "service point script started" in your client's report log whenever you connect to a server with that script, if not the service_point.sqf is not started properly from your init.sqf.

 

Ok so the script is starting and the fuel pumps are the standard Land_A_FuelStation_Feed which are a part of the DZE_FuelPumpArray, could it have anything to do with the fact that I have a custom compiles or variables?

Link to comment
Share on other sites

Ok so the script is starting and the fuel pumps are the standard Land_A_FuelStation_Feed which are a part of the DZE_FuelPumpArray, could it have anything to do with the fact that I have a custom compiles or variables?

it should not matter, unless you have some script errors in your custom files.. sorry I don't know why it isn't working for you it can be anything, every letter matters in programming...

Link to comment
Share on other sites

no prob and thank you for answering ill search the thread again :)

 

Did you find a solution yet and want to share?

I have little time to spend in this for my own so... Please? :)

Link to comment
Share on other sites

Hey guys, figured I'd share this with yall.

 

I did a bit of scripting over the weekend and fixed a couple of issues with the re-arm script and added a new feature.

 

Fixes:

* Can now arm driver/pilot based weaponry

* Re-arming no longer removes ALL ammo, just the ammo type you are rearming.  This is required since there are issues with adding too many mags to a vehicle.

 

Addon:

* Can now exclude specific ammo type from rearming.  My example includes removal of hydras and s-5 rockets from air vehicles.

 

link:

https://github.com/deadfred666/dayz  (Note, this repo is already configured for my server's weaponry.  you will probably need to adjust prices accordingly)

Hambeast I'm using your additions which are awesome btw! However, it requires exact change. I have seen the fix in this post where you change if !([_costs] call player_checkAndRemoveItems) exitWith {}; to if !([[[_costs select 0, _costs select 1]],0] call epoch_returnChange) exitWith {}; but your .sqf's look have this: if !([_costs] call AC_fnc_checkAndRemoveRequirements) exitWith {};

 

If I changed that line to the call epoch_returnchange line above, would it break anything? Specifically the removal of flares when arming a chopper?

 

If it would, How would I change it to make it possible to pay 5 x 10oz gold out of a briefcase?

Thanks

Link to comment
Share on other sites

Hey, instead of writing your long question, you could have just tried it yourself and yes it should work! :D

AC_fnc_checkAndRemoveRequirements was my own function provided with the first version of this script, since Epoch 1.0.4. I have added that function as player_checkAndRemoveItems to the default Epoch code, that why the name changed but it is essentially the same... so just try it yourself, you should have a test server for stuff like this anyways :)

Link to comment
Share on other sites

Is there a revised version of this that doesnt have the bugs the original post version has? I ask because there's 24 pages and to siff through all the trash posts and find the important infos is kind of extremely time intensive.
Could anyone involved in this, release this revised version, if there is something like that? I would greatly appreciate it!

Link to comment
Share on other sites

Hi,

 

Thank you for this amazing release! I am just having a problem, When an Un Armed Vehicle like a Sedan parks next to a fueling station, it says Rearm Horn for 1 10ozGold

 

When the player re arms nothing obviously happens but their money is taken away. How could this be fixed?

Thanks.

Link to comment
Share on other sites

Hi,

 

Thank you for this amazing release! I am just having a problem, When an Un Armed Vehicle like a Sedan parks next to a fueling station, it says Rearm Horn for 1 10ozGold

 

When the player re arms nothing obviously happens but their money is taken away. How could this be fixed?

Thanks.

 

That just sounds like stupid tax, leave it in so the morons learn.

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...