[RELEASE] [ESX] Lenzh_Chopshop v2!

Thank you - Works great!

Works great minus the cooldown not working!

hi, did you modify something or what? I can’t find why i can’t sell

maybe try this

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		local playerPed = PlayerPedId()
		local coords = GetEntityCoords(playerPed)

		if GetDistanceBetweenCoords(coords, Config.Zones.Shop.coords, true) < 3.0 then
			if not menuOpen then
				ESX.ShowHelpNotification(_U('shop_prompt'))

				if IsControlJustReleased(0, 38) then
					
					OpenShop()
				end
			else
				Citizen.Wait(500)
			end
		end
end)

instead of

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		local playerPed = PlayerPedId()
		local coords = GetEntityCoords(playerPed)

		if GetDistanceBetweenCoords(coords, Config.Zones.Shop.coords, true) < 3.0 then
			if not menuOpen then
				ESX.ShowHelpNotification(_U('shop_prompt'))

				if IsControlJustReleased(0, 38) then
					wasOpen = true
					OpenShop()
				end
			else
				Citizen.Wait(500)
			end
		else
			if wasOpen then
				wasOpen = false
				ESX.UI.Menu.CloseAll()
			end

			Citizen.Wait(500)
		end
	end
end)

nope, doesn’t work

Hi really loving the mod!

do you have any cord sugestions for other scrap yards?

why didt you make this a white listed job it would be perfect !

its not a job dude did you even try it?

yeah but thats what i mean if it was it would be amazing at the min its just away to farm money but if this was player controlled this would be one of the best releases so far this month

feel free to make it that way…

haha im new to lua but i will give it a go when i learn alot more :smiley: always loved the idea of running a chop shop lol :smiley: but the way you done your is amazing dude 10/10

Anyone got client side cool downs +

I would highly suggest a list and cool down on that list, right now on my server, all the petty no roleplay crims are basically farming this.

there is a cooldown

its global though right?

@Lenzh_FX amaaaazing it works like a charm i cant wait to see what updates you may have later on down the line

1 Like

It doesn’t work, even if you try to use it. Not global, not at all. I’m having the same issue as you, where no-rp kids are farming this when PD isn’t on. Had to nerf the pricing until the cooldown gets fixed.

1 Like

Hello @Lenzh_FX, wonderful release.

I just have a problem: when I open the sell menu I get an error about a nil value (field ‘Math’), something messing with ESX.Math.GroupDigits so I tried to change this in client\main.lua, line 75:

label = ('%s - <span style="color:green;">%s</span>'):format(v.label, _U('item', ESX.Math.GroupDigits(price))),

with this one

label = ('%s - <span style="color:green;">%s</span>'):format(v.label, _U('item', (price))),

The menu is now opening, dunno what’s going on with ESX.Math. The problem is that when I press Enter to sell parts (items I own in the inventory ofc) I don’t sell anything, I don’t get any notification about selling and I still have items in inventory.
Can you help me please?

Thanks.

1 Like

With this change i finally got the menu open, but like you, when i click to spend nothing happens;
i cannot open the menu twice, until i DC

I have the same problem for a long time now, and yes I have updated ex extended and essential mode, it seems to be incompatibility with other resources that we have on our servers. He can’t fix what he can’t replicate on his server. So, better not to use it at all…

Guys I fixed it:

  • Go here https://github.com/ESX-Org/es_extended and download the zip;
  • Copy the “common” folder you find in the zip into the server’s “es_extended” folder;
  • Go into es_extended and open the “__resource.lua” file;
  • Add this code both in server_scripts and client_scripts;
'common/modules/math.lua'
  • Save and restart the server.

Add the code like I did here:

Screenshot

It worked for me, hope it will for you too.

1 Like