Jump to content

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


Axe Cop

Recommended Posts

The problem is there's 26 pages of mostly shit and the OP hasn't been updated with any of the useful info for ages, so what do you expect....

I am not adding a general scripting FAQ for total arma noobs, sorry but that should be a separate topic (pinned) , I mentioned that before but apparently there is no Q&A topic for basic scripting stuff yet, is there?

Actually I have no clue how so many people are using anti hacks and have no idea how to use them properly, that has nothing to do with this script.

Link to comment
Share on other sites

What are the name of the actions so i can add them to infistar, i looked for them on the files but couldnt find anything.

if you search for "action" in the first file you should see them, but here you go :)

SP_refuel_action
SP_repair_action
SP_rearm_action
SP_rearm_actions
Link to comment
Share on other sites

I am not adding a general scripting FAQ for total arma noobs, sorry but that should be a separate topic (pinned) , I mentioned that before but apparently there is no Q&A topic for basic scripting stuff yet, is there?

Actually I have no clue how so many people are using anti hacks and have no idea how to use them properly, that has nothing to do with this script.

Yeah that's cool man, I understand, was just saying to him why it's how it is that's all ;)

Link to comment
Share on other sites

Question, instead of designating a building as the rearm/service point can I use an NPC that's not used anywhere else on the map?

yeah should work, see first post

 

 

  • dynamic service points where you are able to select the options (default at every fuel station, if you want it's easy to add the epoch fuel pumps so you can build a service point in your base, you can also add vehicles or units if you want, like a NPC trader)
Link to comment
Share on other sites

SP_refuel_action
SP_repair_action
SP_rearm_action
SP_rearm_actions

 

@YuriLowell

 

These actions are already whitelisted in InfiSTAR's tool - if you do not have them whitelisted, then you have a dangerously outdated copy and should email Chris to get an update.

 

If you got it from a friend, or a free version from places like SurvivalServers, you should really consider buying a proper copy.

Link to comment
Share on other sites

How do i set it so repair is free for all vehicles ?

 

Thanks in advance

 

Open the service_point.sqf (this is mine by the way, not the default one):

 

_refuel_costs = [
["Air",["ItemGoldBar",2]],
["AllVehicles",["ItemGoldBar",1]]
]; // free for all vehicles (equal to [["AllVehicles",[]]])

So it would look like this (do this for any or all of the options you want to be free):

 

_refuel_costs = [
["AllVehicles",[]]
]; // free for all vehicles (equal to [["AllVehicles",[]]])
Link to comment
Share on other sites

How do i set it so repair is free for all vehicles ?

 

Thanks in advance

just do it like the default refuel costs list, leave it empty or like Cinjun said is the same:

refuel_costs = []; // default
repair_costs = []; // now repair is also free

that should be simple enough? :)

Link to comment
Share on other sites

Hi Axe Cop, is there any easy way to change the costs from gold to single currency amount?

well it should be fairly easy with a few changes in the scripts yes, but I can't help you with that because I have no scripting knowledge of the single currency stuff..

Link to comment
Share on other sites

well it should be fairly easy with a few changes in the scripts yes, but I can't help you with that because I have no scripting knowledge of the single currency stuff..

If I change:

_repair_costs = [

        ["Air",["ItemGoldBar",5]], // 5 Gold for helicopters and planes

        ["AllVehicles",["ItemGoldBar",2]] // 2 Gold for all other vehicles

 

to

 

_repair_costs = [

        ["Air",["Coins",40000]], // 40000 Coins for helicopters and planes

        ["AllVehicles",["Coins",20000]] // 20000 Coins for all other vehicles

 

When I attempt to repair I get a popup saying I need more coins.  So obviously it needs more work.  Well beyond my ability however.  If you find yourself interested the thread on Single currency is here

Link to comment
Share on other sites

If I change:

_repair_costs = [

        ["Air",["ItemGoldBar",5]], // 5 Gold for helicopters and planes

        ["AllVehicles",["ItemGoldBar",2]] // 2 Gold for all other vehicles

 

to

 

_repair_costs = [

        ["Air",["Coins",40000]], // 40000 Coins for helicopters and planes

        ["AllVehicles",["Coins",20000]] // 20000 Coins for all other vehicles

 

When I attempt to repair I get a popup saying I need more coins.  So obviously it needs more work.  Well beyond my ability however.  If you find yourself interested the thread on Single currency is here

It doesnt work that way ^^, ill make it this evening ^^

Link to comment
Share on other sites

of course is is not that easy, like that it would just look for 40000 items of type "Coins" in your inventory :D

essentially you have to include the banking system functions instead of epoch_returnChange you use "banking_remove_coins" or whatever... I don't know but I guess there is a simple function you can just call to remove coins from your wallet!?

Link to comment
Share on other sites

My apologies if this has already been addressed.  My topic searches came up empty.

The script works fine, however I need to remove the vanilla "refuel" option.  Atm, I have two.

Running Overpoch.

 

Thank you.

I don't know vanilla Overpoch has no refuel options, as far as I know you have to talk to the NPC inside of the gas station and get a really nice menu to refuel and repair!? :)

Link to comment
Share on other sites

I don't know vanilla Overpoch has no refuel options, as far as I know you have to talk to the NPC inside of the gas station and get a really nice menu to refuel and repair!? :)

Do you mean, we can put NPC's inside of fuel stations, and?  Really ?   Now that would be cool.

Link to comment
Share on other sites

Do you mean, we can put NPC's inside of fuel stations, and?  Really ?   Now that would be cool.

sure you can, i mean I am playing overpoch and it is like that on all official servers!? I though you know that if you are playing overpoch lol

Link to comment
Share on other sites

Any update on this Zupa?

 

Ok, sorry, didnt had alot of time, i'm leaving any second to a 5days festival now.

 

I quickly wrote this (not tested) so i hope it works, otherwise there will be experienced people helping you in that topic anyways i guess.

 

Link to comment
Share on other sites

I have my NPC's within my refuel stations.  I have them all using the same skin which isn't used anywhere else on the server.

I don't have a test server to test the functionality of the script with the NPC's.

 

Would this work?

 

_servicePointClasses = ["INS_Worker2_DZ"];

Link to comment
Share on other sites

yes it should work like that, but you should really consider using a test server first, with arma scripts it is hard to say if you missed something and nothing works :D

it is really simple to install a test server on the same machine you run your game on, you just have to install a mysql server and then copy your live server over to your pc (or just copy the mission + database).

Link to comment
Share on other sites

Thank you for the suggestion.. :P

What I do is have a *WIP* folder that I use when the server is quiet late at night - so I can quickly upload my changes and test them - whilst having backups is easy as it's normally only one or two files I'm changing at a time.  

 

I still can't get my npc menu to appear for the _servicePointClasses = ["INS_Worker2_DZ"];

That npc classname isn't in use anywhere.  

It's also not in the database.  ( I got the classname to use through infistar )

The NPC's I entered into my mission.sqf file.  They do spawn at each of the coords I setup - and when I do an "info" on them in game - they are running as "INS_Worker2_DZ."  Although the skins are all different on these new npc's - the classnames are identical.

 

I can provide you a file or two if needed,  any help is appreciated.  

Thanks Axe Cop !  You sir are a Legend. :)

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