[RE-RELEASE] esx_eden garage2: 3 in 1 garage

Fivem and money are a no go

You need esx_duty for this. Look in the forum for the script.
in server client

ESX = nil

TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

RegisterServerEvent('duty:onoff')
AddEventHandler('duty:onoff', function(job)

    local _source = source
    local xPlayer = ESX.GetPlayerFromId(_source)
    local job = xPlayer.job.name
    local grade = xPlayer.job.grade
    
    if job == 'police' or job == 'ambulance' or job == 'taxi' then
        xPlayer.setJob('off' ..job, grade)
        TriggerClientEvent('esx:showNotification', _source, _U('offduty'))
    elseif job == 'offpolice' then
        xPlayer.setJob('police', grade)
        TriggerClientEvent('esx:showNotification', _source, _U('onduty'))
    elseif job == 'offambulance' then
        xPlayer.setJob('ambulance', grade)
        TriggerClientEvent('esx:showNotification', _source, _U('onduty'))
	elseif job == 'offtaxi' then
        xPlayer.setJob('taxi', grade)
        TriggerClientEvent('esx:showNotification', _source, _U('onduty'))
    end

end)

Then you change it to this

ESX = nil

TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

RegisterServerEvent('duty:onoff')
AddEventHandler('duty:onoff', function(job)

    local _source = source
    local xPlayer = ESX.GetPlayerFromId(_source)
    local job = xPlayer.job.name
    local grade = xPlayer.job.grade
    
    if job == 'police' or job == 'ambulance' or job == 'taxi' then
        xPlayer.setJob('off' ..job, grade)
        TriggerClientEvent('esx:showNotification', _source, _U('offduty'))
		exports.ft_libs:DisableArea("esx_eden_garage_area_police_mecanodeletepoint")		
        exports.ft_libs:DisableArea("esx_eden_garage_area_police_mecanospawnpoint")	  		
        exports.ft_libs:DisableArea("esx_eden_garage_area_Bennys_mecanodeletepoint")		
        exports.ft_libs:DisableArea("esx_eden_garage_area_Bennys_mecanospawnpoint")
    elseif job == 'offpolice' then
        xPlayer.setJob('police', grade)
        TriggerClientEvent('esx:showNotification', _source, _U('onduty'))
		exports.ft_libs:EnableArea("esx_eden_garage_area_police_mecanodeletepoint")		
        exports.ft_libs:EnableArea("esx_eden_garage_area_police_mecanospawnpoint")	  		
        exports.ft_libs:EnableArea("esx_eden_garage_area_Bennys_mecanodeletepoint")		
        exports.ft_libs:EnableArea("esx_eden_garage_area_Bennys_mecanospawnpoint")
    elseif job == 'offambulance' then
        xPlayer.setJob('ambulance', grade)
        TriggerClientEvent('esx:showNotification', _source, _U('onduty'))
	elseif job == 'offtaxi' then
        xPlayer.setJob('taxi', grade)
        TriggerClientEvent('esx:showNotification', _source, _U('onduty'))
    end

end)

This should work.

2 Likes

ok eden garage 2 how do i change the marker type?

is there any way to remove repair when player want to put the car in garage?

1 Like

yes just extend the function vehiclemods in es_extended functien.lua . add vehiclehealth and fuellevel and so on so save it directly to database in 4 lines of code

just look at documentation of ft_libs or look somewhere it says marker :slight_smile:

you don’t nessesary need esx_duty just
if citizenclothes then offduty end
if workclothes then ondury end

in any script

i think you got some server issues before having that error. resolve first server issues

just read the error and you will know what to do … maybe this can help you …

Unknown column 'fourrieremecano' in 'where clause'

thanks for reporting the error fixed it on github, or just remove the gettext function

send me you server and i can maybe debugh it, it is really weird becasue on my sevrer i do not have that problem and neither some sevrers , other server do have same problem. but i i dont have that problem myself i cannot correct it …

sometimes, like 1/10 when you buy car you cannot enter idk why. just take an impound car and will work fine. just little bug for hours of pleasure

or just make locales and puch your version

nvm, my worng.

Is there a way I can change it to English?

How do you reduce the repair cost when returning the vehicle?

@Jager_Bom thx for that work! Really nice.

Is there maybe an option, you can include, costs for repairing car?

@all
I am not really understand this part:

if you want the impound of police and mechanic to work, paste those lines when you take your duty:

exports.ft_libs:EnableArea("esx_eden_garage_area_police_mechanicdeletepoint")		
exports.ft_libs:EnableArea("esx_eden_garage_area_police_mechanicspawnpoint")	  		
exports.ft_libs:EnableArea("esx_eden_garage_area_Bennys_mechanicdeletepoint")		
exports.ft_libs:EnableArea("esx_eden_garage_area_Bennys_mechanicspawnpoint")		

and offduty:

exports.ft_libs:DisableArea("esx_eden_garage_area_police_mechanicdeletepoint")		
exports.ft_libs:DisableArea("esx_eden_garage_area_police_mechanicspawnpoint")	  		
exports.ft_libs:DisableArea("esx_eden_garage_area_Bennys_mechanicdeletepoint")		
exports.ft_libs:DisableArea("esx_eden_garage_area_Bennys_mechanicspawnpoint")		

can someone please give me a hint, please?

Hint: look through the topic for the answer. You will find it. :wink:

That hint not really help me, sorry :wink: maybe its to late - a better helpng hint? ARgggk!

paste those lines when you take your duty: ???

Damn forgot it ^^ its to late I overread it, thx =)

I made a dupeglitch fix for this garage, but I ain’t gonna publish it, because I don’t want to give my competitors my version of the garage

wtf … lol :woman_facepalming:

there is no dupeglish possible on my server with this garage

forum is here to help if the question has not been answered. your question has already been answered uppost in the tread. just take a bit of time to read comments of those that had same problem :slight_smile:

For some reason it keeps saying the car is impounded. So I go get it then put it back in garage then go to take out again n it says it’s impounded again

Hello,

I need help with the addon car names in the garage.
Now it shows the spawn name of the car and i want the normal name.
As example: It shows: rmodmustang and i want Ford Mustang GT.
Need%20Help

Hello. I have a problem … I have a problem with the console after uploading

Could not find dependency ft_libs for resource esx_garage2. 
e[93mCouldn't start resource esx_garage2.e[0m

Like i said when you stream your car you need To send cars name in vehiclename.lua

You dont meet all requirements To start the script

What do I have to write in the vehiclename.lua?