-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can someone help me please #86
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using esx_eden_garage,
and with this code: function StoreVehicleInGarage(vehicle)
local plate = GetVehicleNumberPlateText(vehicle)
local fuelLevel = exports["LegacyFuel"]:GetFuel(vehicle)
TriggerServerEvent('vehiclesStored', plate, fuel)
end
I cant seem to save the fuel when putting in garage. Where is this code going to be added?
`local CurrentAction = nil
local GUI = {}
GUI.Time = 0
local HasAlreadyEnteredMarker = false
local LastZone = nil
local CurrentActionMsg = ''
local CurrentActionData = {}
local times = 0
local this_Garage = {}
-- Init ESX
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
end)
--- Blips Management
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
--PlayerData = xPlayer
--TriggerServerEvent('esx_jobs:giveBackCautionInCaseOfDrop')
refreshBlips()
end)
function refreshBlips()
local zones = {}
local blipInfo = {}
end
--Menu function
function OpenMenuGarage(PointType)
ESX.UI.Menu.CloseAll()
local elements = {}
end
-- View Vehicle Listings
function ListVehiclesMenu()
local elements = {}
end
function reparation(prix, vehicle, vehicleProps)
ESX.UI.Menu.CloseAll()
end
RegisterNetEvent('eden_garage:deletevehicle_cl')
AddEventHandler('eden_garage:deletevehicle_cl', function(plate)
local _plate = plate:gsub('^%s*(.-)%s*$', '%1')
local playerPed = GetPlayerPed(-1)
end)
function ranger(vehicle, vehicleProps)
TriggerServerEvent('eden_garage:deletevehicle_sv', vehicleProps.plate)
TriggerServerEvent('eden_garage:modifystate', vehicleProps, true)
end
-- Function that allows player to enter a vehicle
function StockVehicleMenu()
local playerPed = GetPlayerPed(-1)
end
--Function for spawning vehicle
function SpawnVehicle(vehicle)
ESX.Game.SpawnVehicle(vehicle.model, {
x = this_Garage.SpawnPoint.Pos.x,
y = this_Garage.SpawnPoint.Pos.y,
z = this_Garage.SpawnPoint.Pos.z + 1
}, this_Garage.SpawnPoint.Heading, function(callback_vehicle)
ESX.Game.SetVehicleProperties(callback_vehicle, vehicle)
SetVehRadioStation(callback_vehicle, 'OFF')
TaskWarpPedIntoVehicle(GetPlayerPed(-1), callback_vehicle, -1)
local plate = GetVehicleNumberPlateText(callback_vehicle)
TriggerServerEvent('ls:mainCheck', plate, callback_vehicle, true)
end)
end
--Function for spawning vehicle
function SpawnPoundedVehicle(vehicle)
ESX.Game.SpawnVehicle(vehicle.model, {
x = this_Garage.SpawnMunicipalPoundPoint.Pos.x,
y = this_Garage.SpawnMunicipalPoundPoint.Pos.y,
z = this_Garage.SpawnMunicipalPoundPoint.Pos.z + 1
}, 180, function(callback_vehicle)
ESX.Game.SetVehicleProperties(callback_vehicle, vehicle)
local plate = GetVehicleNumberPlateText(callback_vehicle)
TriggerServerEvent('ls:mainCheck', plate, callback_vehicle, true)
end)
end
-- Marker actions
AddEventHandler('eden_garage:hasEnteredMarker', function(zone)
if zone == 'spawn' then
CurrentAction = 'spawn'
CurrentActionMsg = _U('spawn')
CurrentActionData = {}
end
end)
AddEventHandler('eden_garage:hasExitedMarker', function(zone)
ESX.UI.Menu.CloseAll()
CurrentAction = nil
end)
function ReturnVehicleMenu()
ESX.TriggerServerCallback('eden_garage:getOutVehicles', function(vehicles)
local elements = {}
end
-- Display markers
Citizen.CreateThread(function()
while true do
Wait(0)
local coords = GetEntityCoords(GetPlayerPed(-1))
end)
-- Open/close menus
Citizen.CreateThread(function()
local currentZone = 'garage'
end)
-- Button press
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
end)
-- Fin controle touche`
The text was updated successfully, but these errors were encountered: