(SOLVED) HELP AGAIN! Code keeps forcing itself back to original?

Hey!

At this point I’m questioning my ability to run a server…noob.

I have a lovely new HUD UI inventory added into my FTP but the original code for the default inventory is set to “F2” key in es_extended so both menus pop up. The issue I’m having is that the code in the default file keeps forcing itself back to what it was upon game launch. Why is this happening!? In HTML code in know you can do “!important” after a line of code to force it to remain that way, how do I get around this?

The code section is

"-- Menu interactions
Citizen.CreateThread(function()
** while true do**

** Citizen.Wait(0)**

** if IsControlJustReleased(0, Keys[‘F2’]) and IsInputDisabled(0) and not isDead and not ESX.UI.Menu.IsOpen(‘default’, ‘es_extended’, ‘inventory’) then**
** ESX.ShowInventory()**
** end**

** end**
end)"

Installed this mod https://github.com/Trsak/esx_inventoryhud

Thanks guys and girls

In es_extended client/main.lua you want to comment out that function like this:

-- Menu interactions
--Citizen.CreateThread(function()
--	while true do
--
--		Citizen.Wait(0)
--
--		if IsControlJustReleased(0, Keys['F2']) and IsInputDisabled(0) and not isDead and not --ESX.UI.Menu.IsOpen('default', 'es_extended', 'inventory') then
--			ESX.ShowInventory()
--		end
--
--	end
--end)

That is how I did it on my server and it works perfect.

So I’m guessing your using zaphosting in the section where you download the esx resources turn off file overwriting because every time you make a change to the it gets replaced. that’s not his problem Toxic I’m pretty sure he’s using zap hosting. And his files are getting over written that’s why the change isn’t saving.

Hope this helps

Could be this too! I forget about Zap Hosting with the overwrite thing … part of why I self host on a dedicated server.

1 Like

Same alot easier tbh

1 Like

I am indeed using Zap, is there a way around this fellas?

Sure is go to the section where you installed es_extended and turn off file overwriting and job done then remove that line of code and your good to go.

1 Like

Just read your reply Yozza! I’ll try that!

IT WORKED - Legends both of you, thanks <3

2 Likes