Fuel.GetFuelName
This commit is contained in:
1 parent
7d43d65058
commit
2fb2edff9b
13 files changed
+175
-20
No files matched your search
@@ -2,15 +2,26 @@ local resourceName = "BigDaddy-Fuel"
|
||||
local configValue = BridgeClientConfig.Fuel
|
||||
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
|
||||
|
||||
--print("Fuel: Loading BigDaddy-Fuel")
|
||||
--if GetResourceState('BigDaddy-Fuel') ~= 'started' then return end
|
||||
Fuel = Fuel or {}
|
||||
|
||||
---This will get the name of the Fuel being used (if a supported Fuel).
|
||||
---@return string
|
||||
Fuel.GetFuelName = function()
|
||||
return resourceName
|
||||
end
|
||||
|
||||
---This will get the fuel level of the vehicle.
|
||||
---@param vehicle number The vehicle entity ID.
|
||||
---@return number fuel The fuel level of the vehicle.
|
||||
Fuel.GetFuel = function(vehicle)
|
||||
if not DoesEntityExist(vehicle) then return 0.0 end
|
||||
return exports['BigDaddy-Fuel']:GetFuel(vehicle)
|
||||
end
|
||||
|
||||
---This will set the fuel level of the vehicle.
|
||||
---@param vehicle number The vehicle entity ID.
|
||||
---@param fuel number The fuel level to set.
|
||||
---@return nil
|
||||
Fuel.SetFuel = function(vehicle, fuel)
|
||||
if not DoesEntityExist(vehicle) then return end
|
||||
exports['BigDaddy-Fuel']:SetFuel(vehicle, fuel)
|
||||
|
||||
Reference in new issue
Block a user