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 arealocal 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 : nilprint("The character is not in any fuel station area")end```
```lua-- Returns player stationslocal GetMyOwnStations = exports['wert-fuelstations']:MyStations()-- Tablefor k,v inpairs(GetMyOwnStations) doif v thenprint("The owner of the Number 1 station")elseprint("No owner of the number 1 station")endend-- Other check methodlocal check_station_number =1if GetMyOwnStations[check_station_number] thenprint("The owner of the Number ".. check_station_number .." station")elseprint("No owner of the number ".. check_station_number .." station")end```
```lua-- Returns player employee stationslocal GetMyEmployeeStations = exports['wert-fuelstations']:MyEmployess()-- Tablefor k,v inpairs(GetMyEmployeeStations) doif v thenlocal rank = vprint("Employee found for this station your rank : " .. rank)elseprint("You're not have employee for this station")endend-- Other check methodlocal check_station_number =1if GetMyEmployeeStations[check_station_number] thenlocal rank = GetMyEmployeeStations[check_station_number]print("Employee found for this station your rank : " .. rank)elseprint("You're not have employee for this station")end```
```lua-- Returns player refineryslocal GetMyOwnRefinerys = exports['wert-fuelstations']:MyRefinerys()-- Tablefor k,v inpairs(GetMyOwnRefinerys) doif v thenprint("You own this refinery : " .. k)elseprint("You're not own this refinery : " .. k)endend-- Other check methodlocal check_refinery_name ="refinery-1"if GetMyOwnRefinerys[check_refinery_name] thenprint("The owner of the this refinery ".. check_refinery_name)elseprint("You're not own this refinery : " .. check_refinery_name)end```
```lua-- It get up the liter price, fuel price and fuel sales status of stationslocal StationFuelDatas = exports['wert-fuelstations']:StationFuelData()local check_station_number =1if StationFuelDatas[check_station_number] thenlocal row = StationFuelDatas[check_station_number]-- Returns :print(row.price) -- Fuel station a liter priceprint(row.fuel) -- Fuel station fuel levelprint(row.status) -- If status == 1 fuel sell active || If status == 0 fuel sell deactiveend```
```lua-- Returns whether stations have been sold or notlocal SellingStations = exports['wert-fuelstations']:SellingStations()local check_station_number =1if SellingStations[check_station_number] thenprint("This station has been sold")elseprint("This station is not sold")end```
```lua-- Returns whether refinerys have been sold or notlocal SellingRefinerys = exports['wert-fuelstations']:SellingRefinerys()local check_refinery_name ="refinery-1"if SellingRefinerys[check_refinery_name] thenprint("This refinery has been sold")elseprint("This refinery is not sold")end```
```lua-- Returns tankers and fuel levels where work can be donelocal SavedTankers = exports['wert-fuelstations']:Tankers()local plate ="CHECKPLATE" -- args plateif SavedTankers[plate] thenlocal tanker_fuel_level =tonumber(SavedTankers[plate])print("Tanker fuel : " .. tanker_fuel_level)elseprint("Tanker not have any fuel")end```
```lua-- The station adds fuel to the tanklocal target_station =1local add_fuel_amount =1000-- Ltexports['wert-fuelstations']:AddFuelStation(target_station, add_fuel_amount)```
```lua-- The station remove fuel to the tanklocal target_station =1local remove_fuel_amount =1000-- Ltexports['wert-fuelstations']:RemoveFuelStation(target_station, remove_fuel_amount)```
```lua-- It helps to add money to the station caselocal target_station =1local add_money_amount =10000exports['wert-fuelstations']:AddMoneyStation(target_station, add_money_amount)```
```lua-- It helps to remove money to the station caselocal target_station =1local remove_money_amount =20000exports['wert-fuelstations']:RemoveMoneyStation(target_station, remove_money_amount)```