English Not solved Implementing a Gas Station Farming System: Need Help with Prices and Fuel Availability

  • Bonjour Visiteur ! Les sujets de cette catégorie sont clos. Si vous souhaitez réouvrir, merci de nous contacter en précisant le lien du post à réouvrir !

    Hello Visiteur ! The topics in this category are closed. If you wish to reopen, please contact us with the link of the post you wish to reopen !
16/10/20
10
0
100
Hello, I have a question for you and I need your help. I am really not a script professional and just play something with the idea that I would like to implement the following.

I would like to implement the following. You should be able to buy gas stations like houses, I think that shouldn't be a problem (via the COnfig_Housing.hpp) after that it should be possible to adjust the prices of the gas station individually. (Gasoline between 10 and 1500 € per liter)

As a third point, it should be the case that users from the OIL farms have to sell it to the gas stations, and if the player does not sell OIL farms and then the gas stations are empty and thus cannot offer any fuel.


I once heard that there should have been something like that ..

Step 1. Make it available for purchase at the gas station shouldn't be a problem.

Step 2. I would be at a loss to set the prices.

Step 3. the farm route OIL is also no problem.

But now step 4. The condition that the oil must be available to refuel also exceeds my skills.

I would be very grateful if someone could help me with this project.
 
Hi !
It's a big but very interesting project ! However it's clearly not something simple to realize so I hope you know a little bit about the SQF.

For the price, I didn't quite understand how you want to define them. Will they vary as virtual objects in the stock market ? Or will the owner define the prices ?
At that moment you have to save them in the database according to the position of the station.

About the amount of gasoline available at the stations, we have the Fuel Station product that does that. You can use it or rely on its code to reproduce a similar system.
 
Hello, Yes, I have basic knowledge of SQF, but I am still learning.

The owner of the gas station should choose the prices

for the purpose of your tank script would that also be linked to the ACE tank system?
 
This system is not linked to ACE, it basically replace ACE.

About the prices, you should already have a table in your database where owner/position of each fuel station is saved, you can just add a column in this table to save the prices and at the server init, set as a variable on each fuel station, the prices that where saved in the database.
 
You can check the product here : https://www.the-programmer.com/product/fuel-stations/

In this script each station has several types of petrol: diesel, kerosene etc (there are 6 basic ones but it's very easy to add/remove some).
For each vehicle there is 1 type of petrol that you have to put in the tank at the risk of breaking the tank if it's not the right one.
For each petrol station and for each type of petrol there is a quantity available that decreases each time a player fills up his car. And players, with a specific licence, can put petrol (in the form of virtual objects) back into these pumps and earn money.