purchaseFuel

  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

purchaseFuel

« posted: Oct 17, 2016, 12:22 PM »
As the topic shows... this is a script for removing free refueling and applying purchasing at fuel outlets/stations for all land and air vehicles (uav's included).

You can find the two required scripts and image over on my github -> https://github.com/soulkobk/ArmA_Scripts/tree/master/purchaseFuel (script updated to version 1.0.5, see change log in header of scripts, please read the installation information as it has changed!).

My script gathers ALL fuel outlets/stations on the map, then removes the free fuel, and adds an action (and price) so that whether you're in a land vehicle or air vehicle or the driver of a UAV... it's going to cost you to refuel (must be within 10 meters of the fuel outlet, and look directly at the outlet for the option to pop up).

If you partial refuel (cancel after it has begun refueling)... it WILL still cost you (partial cost), so you can't 'glitch fill' your vehicle for free. Want free fuel? Use the 'jerry cans'. :P

  • Scenario.... Drive up to refuel, scroll wheel, 'Purchase Fuel' (and follow the on-screen prompts)... it's that simple. Make sure that you are the driver/operator of said vehicle, else the refueling will abort.

Please note that refueling 'jerry cans' is still 100% FREE, as my script is a 3rd party/separate/standalone script. In order to apply a cost to 'jerry cans', the current A3Wasteland code would need to be modified (not something I intend on doing).

Please read the header of each script (there are two scripts that make purchaseFuel function) for the installation information, as I intend on only giving very limited support.


*Script updated to version 1.0.5, tested (and functioning as intended) by myself, griffinZS and EntraVenuS.

Thanks.

-soul.
  • Offline Matt76
  • Mercenary
  • *****
  • Posts: 418
  • co founder of customcombatgaming.com

Re: purchaseFuel

« Reply #1 posted: Oct 17, 2016, 01:34 PM »
Nice

This is an interesting direction you're going, one I like :-)

We certainly need more money sinks in wasteland

Re: purchaseFuel

« Reply #2 posted: Oct 17, 2016, 02:38 PM »
 ;D nice!

Just an idea .. an icon in front of the text.

.. gonna implement it this evening. Tested yet.  8)

Argh! Tested again on local server .. launched it, rpt says

Quote
18:04:35 "[PURCHASE FUEL] -> ENABLED FUEL PURCHASING AT 85 FUEL PUMPS, NO MORE FREE FUEL!"

.. and then .. it's the same free fuel as before. Gonna check every file again.  :P
  • Offline eldrich
  • First Blood
  • ***
  • Posts: 75
  • 40-1 Clan

Re: purchaseFuel

« Reply #3 posted: Oct 17, 2016, 06:11 PM »
nice soul will test this at the weekend :)

icon looks good griffin

Re: purchaseFuel

« Reply #4 posted: Oct 17, 2016, 09:46 PM »
it doesnt seem to work. followed the instructions but alas i have no joy  :'(
  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

Re: purchaseFuel

« Reply #5 posted: Oct 18, 2016, 04:00 AM »
it doesnt seem to work. followed the instructions but alas i have no joy  :'(

Care to elaborate on why it doesn't work?

;D nice!

Just an idea .. an icon in front of the text.

An icon would be nice, sure... but I didn't add one. Send me the fuelIcon.paa and I can update it when I get time.

*EDIT, just saw the .zip file you posted, will update ASAP. Thanks.

*NOTE, SEE ORIGINAL POST AT THE TOP FOR UPDATED INFORMATION!

-soul.

Re: purchaseFuel

« Reply #6 posted: Oct 18, 2016, 09:05 PM »
installed latest but still gives free fuel :(
  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

Re: purchaseFuel

« Reply #7 posted: Oct 19, 2016, 05:15 AM »
installed latest but still gives free fuel :(

See original post. Script updated to version 1.0.4 which fixes client and server side issues as well as money deductions... therefore it should all be working. Please read the header information for installation instructions, as they have changed.

-soul.

Re: purchaseFuel

« Reply #8 posted: Oct 19, 2016, 09:05 AM »
... therefore it should all be working.

Sorry ..

 

Again both options and fuel gets in automatically.

Quote
WOW this script is a pain in the fggn ass... this ArmA code for client side versus server side is an absolute pain. Editor placed fuel outlets were proper with no free fuel... but the default fuel outlets still had the free option due to not being disabled client side... what a headache. Needless to say, it is now fixed? I fggn hope so. This is the last time I intend on 'fixing' this script. If it's still broken, then I will remove it from my github.

What a pity ..  :-\

Edit: just an idea .. in vanilla, u can land on top of every gasstation and then it will refuel. Maybe the BUILDING of the gasstation works like the gasstation, too? Not just the petrol pump. Maybe there's a way, to disable these buldings to refuel? No, it|s the same with gasstations without any buildings.
  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

Re: purchaseFuel

« Reply #9 posted: Oct 19, 2016, 09:47 AM »
Yeh, it's still broken, and I don't have the time to invest in fixing it at the moment. It's very frustrating when it works... and then it decides it doesn't want to work.

I am again having the cost bug (no fggn idea why, as it was working... nothing changed, and now it's not working again). I assume other A3Wasteland code is conflicting with it.

As for the 'free fuel' option, my 1.0.4 script fixes that (at least in my testing on a dedicated server at default fuel outlets, not user placed ones) as I got NO option to fill for free (default icon/text).

I haven't been this frazzled whilst working on ArmA 3 code for a while now. The relations to client versus server side and the A3WL variables seem to be a damn nightmare at times.

None-the-less, for the time being, there will be no support towards my 1.0.4 scripts.

I will leave the scripts on my github for the time being also... want to debug and contribute to the script? by all means do so... and post your findings on this thread... if you get it functioning as it should, I will be happy to give credit where credit is due.

Thanks...

*EDIT... I have changed the script again (only slightly, see change log on 1.0.5 github release) and tested within a dedicated server environment on A3Wasteland Stratis, to which I can NOT find any faults. There is NO free fuel icon/text on default or editor placed fuel pumps, and the money deductions are working as intended (even after death/respawn). The debugging of this script has been rather annoying (finicky) and temperamental. I tend 'not to give up'... but I do hope this is the LAST of my revisions for this damn script.

-soul.

Re: purchaseFuel

« Reply #10 posted: Oct 19, 2016, 10:45 AM »
Hehe ...  :)
Gonna check asap. *fingerscrossed

EDIT:


You got it!  :D :)

Re: purchaseFuel

« Reply #11 posted: Oct 19, 2016, 07:38 PM »
fixed and working with a little help from Griffin :)
  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

Re: purchaseFuel

« Reply #12 posted: Oct 20, 2016, 03:27 AM »
You got it!  :D :)

Well, thank f**k for that. The client versus server relations in ArmA 3 get a bit frustrating at times. 3DEN tests are different to hosted/dedicated... rather annoying.

fixed and working with a little help from Griffin :)

Glad you got it working also.

Re: purchaseFuel

« Reply #13 posted: Oct 24, 2016, 06:01 PM »
Nice Script Soul, Great fix Griffin...

Re: purchaseFuel

« Reply #14 posted: Oct 24, 2016, 06:57 PM »
LOL? I havn't fixed anything. *muahahaha.
I'm just a taker .. (and tested it)

 ;D

The "fix", Entra talked about was, that he still had the 2 .sqf in his server/function folder (version 1).  ;)