Jump to content

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


Axe Cop

Recommended Posts

Got it sorted out. I was missing a ] in the costs. :)

Just for clarification

"Land_A_FuelStation_Feed"

is the pump.. the feed

The little building with the cash register that spawns loot is

"Land_A_FuelStation_Build"

and the roof and pillars which go over the feeds is

"Land_A_FuelStation_Shed"

 

http://www.armatechsquad.com/ArmA2Class151656165165341654165165165165f/index.php

 

Link to comment
Share on other sites

Just for clarification

"Land_A_FuelStation_Feed"

is the pump.. the feed

The little building with the cash register that spawns loot is

"Land_A_FuelStation_Build"

and the roof and pillars which go over the feeds is

"Land_A_FuelStation_Shed"

 

http://www.armatechsquad.com/ArmA2Class151656165165341654165165165165f/index.php

 

 

In Takistan, the building with the register is Land_Ind_FuelStation_Build_EP1 which is what I have the script set to look for and I have it working now.

Link to comment
Share on other sites

  • 2 months later...

Anyone got any ideas on how to disable this script if a vehicle is locked? I'm thinking some update to the local_lockUnlock file but not sure what to put.

You can simply check if a vehicle is locked with the locked function

just exit the script if the vehicle is locked or whatever you want :D

if (!locked _vehicle) then {
   // only do something if vehicle is not locked
};
Link to comment
Share on other sites

  • 4 weeks later...

I have a Napf map and I did not install auto refuel or repair. We want it somewhat old-school. So I installed a TK_GUE_WarfareBVehicleServicePoint_EP1 in the middle of the map. It would refuel and repair in editor, but will not work in game.

Here is the script:

 

if (isServer) then {
 
_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["TK_GUE_WarfareBVehicleServicePoint_EP1", [10228.423, 10289.031, -0.018438198], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setDir -53.171276; _this setVehicleInit "this setVectorUp [0,0,1];";
  _this setPos [10228.423, 10289.031, -0.018438198];
};
};
 
What do i have to do to get it to refuel and repair?  Thats without turning on all other pumps on the map.
 

Looking through-Vehicle Service Point (Refuel) by Axe Cop,(I use the coin system) I see only one place that might be where i could do it in the Service Point SC . can you look at this and tell me what you think.

service_point.sqf

// general settings
_folder = "service_point\"; // folder where the service point scripts are saved, relative to the mission file
_servicePointClasses = dayz_fuelpumparray; // service point classes (can be house, vehicle and unit classes)   Would I change dayz_fuelpumparry to TK_GUE_WarfareBVehicleServicePoint_EP1 ??
_maxDistance = 10; // maximum distance from a service point for the options to be shown
_actionTitleFormat = "%1 (%2)"; // text of the vehicle menu, %1 = action name (Refuel, Repair, Rearm), %2 = costs (see format below)
_actionCostsFormat = "%2 %1"; // %1 = item name, %2 = item count
_costsFree = "free"; // text for no costs
_message = "Vehicle Service Point nearby"; // message to be shown when in range of a service point (set to "" to disable)
 
Link to comment
Share on other sites

@Thug: Yes in theory that should work with:

_servicePointClasses = ["TK_GUE_WarfareBVehicleServicePoint_EP1"];

like any other  building or vehicle class, but you have to try it I believe there are some admins who tried that and it didn't work but maybe that was due to another problem I can't say for sure. :)

Link to comment
Share on other sites

@Thug: Yes in theory that should work with:

_servicePointClasses = ["TK_GUE_WarfareBVehicleServicePoint_EP1"];

like any other  building or vehicle class, but you have to try it I believe there are some admins who tried that and it didn't work but maybe that was due to another problem I can't say for sure. :)

It worked, thank you  

Link to comment
Share on other sites

  • 2 weeks later...

Hey,

 

ist there a way to get this working for waterbases or for the LHD Carrier?

 

It seems the Fuelpump won't work over water...

 

Just thinking out loud here:

 

Possible problem:

  • Distance calculation is different over water. (as i heard)
Link to comment
Share on other sites

  • 3 weeks later...

Love this script btw

Keep up the good work

 

Im having a problem with the script, I have followed all the steps for installation but when i try to use it in game, the scroll options just does not show

 

I have tried many things to fix but nothing works, I know this has probably been addressed previously but couldn't find it

 

Many thanks for any help :)

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

I am also having a problem with it on napf i drive up to the service station and it says repair, refuel, rearm But when i press any of these nothing happens

i am running single currency and have change the currency Class name to "Coins" and it is registering as coins but nothing happens when i press refuel or the others

 

Link to comment
Share on other sites

  • 2 weeks later...

I am also having a problem with it on napf i drive up to the service station and it says repair, refuel, rearm But when i press any of these nothing happens

i am running single currency and have change the currency Class name to "Coins" and it is registering as coins but nothing happens when i press refuel or the others

 


Try changing it to 
CashMoney.

Link to comment
Share on other sites

  • 2 months later...
4 hours ago, MatthewK said:

This is a bit random but I was wondering if anyone knows how to get the repair script to only repair glass. I want to make this available for players with helis that have been victim of the leaking fuel due to bugged heli issue.  Thanks :)

Should be pretty simple if you have some programming knowledge and look at the file service_point_repair.sqf around line 46+47 the selected part is repaired:

_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _x >> "name");
[_vehicle,_selection,0] call object_setFixServer;

You can use that to check if the part actually is glass and only repair that, the name of the part is stored in the variable "_x", if you don't know the exact part names for the glass check the vehicle config file "cfgVehicles".

Link to comment
Share on other sites

  • 1 month later...

Thanks @Axe Cop, didn't see your reply until just now. I'll give that a go later, will be nice to learn something new :D

@AiiDynBrus You will need to provide a bit more information. Are you getting any errors in your server log ? Provide a breakdown of what you've done so far, maybe pastebin the scripts with links in your breakdown. "this doesn't work" is the needle in a haystack statement for troubleshooting I'm afraid :(

Link to comment
Share on other sites

33 minutes ago, MatthewK said:

Thanks @Axe Cop, didn't see your reply until just now. I'll give that a go later, will be nice to learn something new :D

@AiiDynBrus You will need to provide a bit more information. Are you getting any errors in your server log ? Provide a breakdown of what you've done so far, maybe pastebin the scripts with links in your breakdown. "this doesn't work" is the needle in a haystack statement for troubleshooting I'm afraid :(

MatthewK do you have steam or teamspeak i could talk to you on abit easier saying then type lol

 

 

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