Wert Fuel Stations (Job, Buy, Manage, Create and more ... )

You can access the setup information you need about this product

INSTALLATION

1 - Upload the script folder to the location of your resources

2 - Don't forget to check that your target system and polyzone script are working

3 - Do not forget to add all the sql files contained in the folder to your database

4 - Installation successful, have a good funs

Example of legacy fuel

You can review the legacyfuel script that I used by making some edits via the github link below and use it if you want. This script is designed for use with wert-fuel stations, but if you want, you can also make your own fuel script compatible with wert-fuelstations by using the following exports.

CLIENT EXPORTS

```lua
-- Returns which station area you are in, returns nil if you are not in a station area
local GetCurrentStation = exports['wert-fuelstations']:CurrentFuelStation()
if GetCurrentStation then
    -- return : 1, 2, 3 ...
    print("The player is in the area of the number [1] station")
else
    -- return : nil
    print("The character is not in any fuel station area")
end
```
```lua
-- Returns player stations
local GetMyOwnStations = exports['wert-fuelstations']:MyStations()
-- Table
for k,v in pairs(GetMyOwnStations) do
    if v then
        print("The owner of the Number 1 station")
    else
        print("No owner of the number 1 station")
    end
end
-- Other check method
local check_station_number = 1
if GetMyOwnStations[check_station_number] then
    print("The owner of the Number ".. check_station_number .. " station")
else
    print("No owner of the number ".. check_station_number .. " station")
end
```
```lua
-- Returns player employee stations
local GetMyEmployeeStations = exports['wert-fuelstations']:MyEmployess()
-- Table
for k,v in pairs(GetMyEmployeeStations) do
    if v then
        local rank = v
        print("Employee found for this station your rank : " .. rank)
    else
        print("You're not have employee for this station")
    end
end
-- Other check method
local check_station_number = 1
if GetMyEmployeeStations[check_station_number] then
    local rank = GetMyEmployeeStations[check_station_number]
    print("Employee found for this station your rank : " .. rank)
else
    print("You're not have employee for this station")
end
```
```lua
-- Returns player refinerys
local GetMyOwnRefinerys = exports['wert-fuelstations']:MyRefinerys()
-- Table
for k,v in pairs(GetMyOwnRefinerys) do
    if v then
        print("You own this refinery : " .. k)
    else
        print("You're not own this refinery : " .. k)
    end
end
-- Other check method
local check_refinery_name = "refinery-1"
if GetMyOwnRefinerys[check_refinery_name] then
    print("The owner of the this refinery ".. check_refinery_name)
else
    print("You're not own this refinery : " .. check_refinery_name)
end
```
```lua
-- Returns player refinerys
local GetSellingStations = exports['wert-fuelstations']:SellingStations()
local check_station_number = 1
if GetSellingStations[check_station_number] then
    print("Station selled : ".. check_station_number)
else
    print("Station not selled : " .. check_station_number)
end
```

SERVER EXPORTS

```lua
-- It get up the liter price, fuel price and fuel sales status of stations
local StationFuelDatas = exports['wert-fuelstations']:StationFuelData()
local check_station_number = 1
if StationFuelDatas[check_station_number] then
    local row = StationFuelDatas[check_station_number]
    -- Returns :
    print(row.price) -- Fuel station a liter price
    print(row.fuel) -- Fuel station fuel level
    print(row.status) -- If status == 1 fuel sell active || If status == 0 fuel sell deactive
end
```
```lua
-- Returns whether stations have been sold or not
local SellingStations = exports['wert-fuelstations']:SellingStations()
local check_station_number = 1
if SellingStations[check_station_number] then
    print("This station has been sold")
else
    print("This station is not sold")
end
```
```lua
-- Returns whether refinerys have been sold or not
local SellingRefinerys = exports['wert-fuelstations']:SellingRefinerys()
local check_refinery_name = "refinery-1"
if SellingRefinerys[check_refinery_name] then
    print("This refinery has been sold")
else
    print("This refinery is not sold")
end
```
```lua
-- Returns tankers and fuel levels where work can be done
local SavedTankers = exports['wert-fuelstations']:Tankers()
local plate = "CHECKPLATE" -- args plate
if SavedTankers[plate] then
    local tanker_fuel_level = tonumber(SavedTankers[plate])
    print("Tanker fuel : " .. tanker_fuel_level)
else
    print("Tanker not have any fuel")
end
```
```lua
-- The station adds fuel to the tank
local target_station = 1
local add_fuel_amount = 1000 -- Lt
exports['wert-fuelstations']:AddFuelStation(target_station, add_fuel_amount)
```
```lua
-- The station remove fuel to the tank
local target_station = 1
local remove_fuel_amount = 1000 -- Lt
exports['wert-fuelstations']:RemoveFuelStation(target_station, remove_fuel_amount)
```
```lua
-- It helps to add money to the station case
local target_station = 1
local add_money_amount = 10000
exports['wert-fuelstations']:AddMoneyStation(target_station, add_money_amount)
```
```lua
-- It helps to remove money to the station case
local target_station = 1
local remove_money_amount = 20000
exports['wert-fuelstations']:RemoveMoneyStation(target_station, remove_money_amount)
```

Last updated