Jump to content

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


Axe Cop

Recommended Posts

what do you mean prepacked? i answered prepacked but got thinking about it and we used Axe Cop's refuel and made changes our self.

 

 

i talked to the guy who put it in your Zupa's coin script and took Axe Cop's refuel and changed a file you (Zupa) made and put it in for the refuel.

Edited by Thug
Link to comment
Share on other sites

Well plug him in then lol. Do you happen to have a fuel pump nearby, or is fuelpumparray still in the service point objects list?

 

 

 

Yes I have it in the object list:

_servicePointClasses = dayz_fuelpumparray;

Then have designated my NPC as a fuelpumparray in my variables.sqf

dayz_fuelpumparray = ["TK_CIV_Worker01_EP1"];
Link to comment
Share on other sites

  • 4 weeks later...

When rearming a vehicle with more than one weapon, it adds the magazine for the weapon you choose, and delete all the ammo for every other weapon. Is there a way to prevent this?

 

Looking into it, it seems that the script is meant to do that for whatever reason. You can just comment that part out if you want.

Link to comment
Share on other sites

  • 3 weeks later...

Maybe someone can help me. I'm not a scripter of any sort. I don't speak script. :wacko: So please keep that in mind. I've looked throught this entire thread and I've only seen 3 people asking for what I am attempting to do, which is split up the refuel, repair and rearm script, IE, not using the gas stations to do all these actions. I am working with an Overpoch Napf server on Vilayer with Infinistar. OK, so this is what I have done.

 

I have this in the init:

execVM "service_point\service_point1.sqf"; //refuel
execVM "service_point\service_point2.sqf"; //repair
execVM "service_point\service_point3.sqf"; //rearm

 

Within the service_point folder, I have copied the service_point.sqf 3 times, and added 1,2 and 3 to the end. So I have these files inside the folder, service_point1.sqf, service_point2.sqf, service_point3.sqf, service_point_rearm.sqf, service_point_refuel, and service_point_repair.sqf. Within each of the service_point.sqf scripts I have only changed the _servicePointClasses and whether it's true or false. I haven't touched anything else.

 

service_point1.sqf is refuel, and the edit is this: (default)

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

fuel true, repair false, rearm false

 

service_point2.sqf is repair, and the edit is this:

_servicePointClasses = ["Land_repair_center"]; // service point classes (can be house, vehicle and unit classes)

fuel is false, repair is true, rearm is false

 

service_point3.sqf is rearm and the edit is this:

_servicePointClasses = ["US_WarfareBVehicleServicePoint_Base_EP1"]; // service point classes (can be house, vehicle and unit classes)

fuel is false, repair is false, rearm is true

 

This seems pretty simple. However, only refuel is working. I have tried the servicepointclasses with and without the brackets and quotes. Still only refuel works. If I leave it stock, with just the one service_point.sqf and turn everything to true, it works but obviously only at the gas stations, which is not what I want. So the script works complete as is from github, but only refuel works when I split it. I have triple checked the spelling, it's correct. I must be missing something. Can someone please help me?

 

PS, I already saw the post by GeneralTragedy here:

 

This is not doing what I am looking for, and I understand those changes ever less. :(

Link to comment
Share on other sites

Maybe someone can help me. I'm not a scripter of any sort. I don't speak script. :wacko: So please keep that in mind. I've looked throught this entire thread and I've only seen 3 people asking for what I am attempting to do, which is split up the refuel, repair and rearm script, IE, not using the gas stations to do all these actions. I am working with an Overpoch Napf server on Vilayer with Infinistar. OK, so this is what I have done.

 

I have this in the init:

execVM "service_point\service_point1.sqf"; //refuel

execVM "service_point\service_point2.sqf"; //repair

execVM "service_point\service_point3.sqf"; //rearm

 

Within the service_point folder, I have copied the service_point.sqf 3 times, and added 1,2 and 3 to the end. So I have these files inside the folder, service_point1.sqf, service_point2.sqf, service_point3.sqf, service_point_rearm.sqf, service_point_refuel, and service_point_repair.sqf. Within each of the service_point.sqf scripts I have only changed the _servicePointClasses and whether it's true or false. I haven't touched anything else.

 

service_point1.sqf is refuel, and the edit is this: (default)

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

fuel true, repair false, rearm false

 

service_point2.sqf is repair, and the edit is this:

_servicePointClasses = ["Land_repair_center"]; // service point classes (can be house, vehicle and unit classes)

fuel is false, repair is true, rearm is false

 

service_point3.sqf is rearm and the edit is this:

_servicePointClasses = ["US_WarfareBVehicleServicePoint_Base_EP1"]; // service point classes (can be house, vehicle and unit classes)

fuel is false, repair is false, rearm is true

 

This seems pretty simple. However, only refuel is working. I have tried the servicepointclasses with and without the brackets and quotes. Still only refuel works. If I leave it stock, with just the one service_point.sqf and turn everything to true, it works but obviously only at the gas stations, which is not what I want. So the script works complete as is from github, but only refuel works when I split it. I have triple checked the spelling, it's correct. I must be missing something. Can someone please help me?

 

PS, I already saw the post by GeneralTragedy here:

 

This is not doing what I am looking for, and I understand those changes ever less. :(

I haven't really looked into this script too much, and I dont code myself either, but it seems to me you're wanting a drastic overhaul of the script. I dont know that it is as simple to configure as you'd like. It might require significant change in the code.

Link to comment
Share on other sites

Well Axe Cop himself answered this much earlier in the thread (don't recall who asked the question, sorry):

 

    "would be cool if we could split up what we can do on which building...
    so for example
    refueling on fuel stations, fuel pumps or fuel tanks
    repairing/rearmin on garages or repair buildings...
    any suggestions on this?"

"If you want you can do that by simply copying the service_point.sqf script 3 times and only enable one of repair, refuel or rearm in each script and then change the service point class and start all 3 in your init.sqf, I hope you know what i mean." :D

"That should work, it's about the same performance as if the script itself would check 3 different buildings, not that the script uses much performance but still this is the easiest way without changing the whole script for what you want.
"

 

I thought I was doing what he suggested, although not knowing anything about scripting, I'm not sure. :huh:

Link to comment
Share on other sites

@Sazarac yes it should work exactly like your code, maybe there is some other error or the building class names are simply not found.. hard to say without testing why it is not working with your changes.

the syntax you used is correct: ["Land_repair_center"] with the brackets and quotes (e.g. a list with only a single element in arma script).

what you can can do to test your other changes just use simple objects or building names you know will work, like ["Land_A_FuelStation_Feed"] or some other stuff from the original list:

dayz_fuelpumparray = ["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"];

depending on your map it may be different fuel stations, but if that works there is something wrong with the names you used ("Land_repair_center and" "US_WarfareBVehicleServicePoint_Base_EP1") or the script doesn't work with those..

I can't help you more atm, testing arma scripts is a pain if something doesn't work, I can tell you that much :)

Link to comment
Share on other sites

Oh I'm so relieved I understood you correctly! And what you suggest is my next step. What I negleted to mention was that the buildings I am using are ones I placed on the map through the editor. I'm wondering if that is the issue. I will try something that is aready on the map. Thank you so much for the reply! I feel a bit better knowing I was doing it right. :)

Link to comment
Share on other sites

UPDATE. Alrighty, so last night I put this edit in, restart the server like 3 times, test different locations, different vehicles, park in the repair center and wait, blahblahblah. And it's just not working. I'm

all bummed 'cause I think I borked it. Well I get a Steam chat message from one of the players today saying "The gas stations are broke, there isn't a repair option anymore. Oh NM, I see there are Repair Centers, duh!"  :o 

I pop in and whatdoyouknow? Everything is working PERFECTLY? WTF?! I haven't changed anything. (throws hands up) I have no idea what changed, but ok, this method works perfectly.

Dayz, excuse me Arma, scripts are weird. <_<

Link to comment
Share on other sites

any errors in your RPT?

thank you for replying. sorry im long answering had some rl stuff to deal with. But to answer buddy no, not any errors in the RPT.

see that's what has me stumped normally problem with a mod i look in RPT and it tells me what i did wrong :P, this time everything seems to be working i get the option to refuel/rearm it doesn't take the coins or refuel/rearm the vehicle

Link to comment
Share on other sites

  • 2 weeks later...

Hi AxeCop,

 

I have a small problem and maybe you already discuss this.

 

If I create to units that acts like a trader for the script. Vehicles nearby should get the option but the option never comes up.

 

So if I use the following:

 

_servicePointClasses = dayz_fuelpumparray;

 

Everything works fine, I got the option on every fuelpump.

 

Ok now when I change it to my two units, nothing happens:

 

_servicePointClasses = ["Assistant", "RU_Assistant"];

 

I added the units to my mission.sqf and ingame they're there but without the option.

 

Do you have any idea, where the problem is?

 

 

Many thanks for your help!!!

Link to comment
Share on other sites

  • 3 weeks later...

thank you for replying. sorry im long answering had some rl stuff to deal with. But to answer buddy no, not any errors in the RPT.

see that's what has me stumped normally problem with a mod i look in RPT and it tells me what i did wrong :P, this time everything seems to be working i get the option to refuel/rearm it doesn't take the coins or refuel/rearm the vehicle

Did you ever fix this? I am having the same issue...no errors in rpt... I have the scroll wheel option but it doesn't work.

 

EDIT: Nevermind I reinstalled it and now its working fine 

Link to comment
Share on other sites

Hi AxeCop,

 

I have a small problem and maybe you already discuss this.

 

If I create to units that acts like a trader for the script. Vehicles nearby should get the option but the option never comes up.

 

So if I use the following:

 

_servicePointClasses = dayz_fuelpumparray;

 

Everything works fine, I got the option on every fuelpump.

 

Ok now when I change it to my two units, nothing happens:

 

_servicePointClasses = ["Assistant", "RU_Assistant"];

 

I added the units to my mission.sqf and ingame they're there but without the option.

 

Do you have any idea, where the problem is?

 

 

Many thanks for your help!!!

Just a guess, it could be that the script is looking for vehicles and not units.

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to use this on my Takistan server. No errors in the server or client log. When I get to the gas station, there is no notification that I am near a service point and no options in the scroll menu to refuel. Takistan uses "Land_Ind_FuelStation_Build_EP1" for the gas station classnames. I have this set in my service_point.sqf:

_servicePointClasses = ["Land_Ind_FuelStation_Build_EP1"]; 

I got this class name by looking at the building and hitting the "I" key (Using Infistar - that displays the classname and other info about what you are looking at). Any suggestions on what to do next? Is anyone else using this with Takistan?

Link to comment
Share on other sites

I'm trying to use this on my Takistan server. No errors in the server or client log. When I get to the gas station, there is no notification that I am near a service point and no options in the scroll menu to refuel. Takistan uses "Land_Ind_FuelStation_Build_EP1" for the gas station classnames. I have this set in my service_point.sqf:

_servicePointClasses = ["Land_Ind_FuelStation_Build_EP1"]; 

I got this class name by looking at the building and hitting the "I" key (Using Infistar - that displays the classname and other info about what you are looking at). Any suggestions on what to do next? Is anyone else using this with Takistan?

Are you 100% certain that is the name of the pump and not the surrounding station?

Perhaps try adding your own in the map editor using this classname

"Land_A_FuelStation_Feed"

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
×
×
  • Create New...