[RELEASE] [ESX] Lenzh_Chopshop v2!

Can anyone explain what this is?

the coordinates everything works, but when it comes to executing the steps, it does not work
I mean, the car is dismantled but it does not give me the pieces and the NPC does not show me to click “e” to sell.

@Demelillas
Delete everything. Redownload. Clear cache install again. If does not work look log for errors. Works fine multiple server has it working. So something somewhere in your server something happen.

@Breeze
Steal a car. Got to chop blip on the map. Get in the marker. Click e to chop. Car, wait for all animation to be done. Get part from the vehicle. Go to shop blip on the map Get in the marker sell the part. Don’t get caught by the police. It’s just something to do instead of always jobs :wink:

3 Likes

If someone has a nice idea to get implemented hmu

could you add option only cars that’s players own it in server instead of all kinda of cars ? you could use database plate for cars to do that or any thing else … I hope it easy to do … and thank you for this awesome work cheers. .

sorry also I edited how long to take to chop car from 60000 ms to 300000 ms but didn’t change at all same 1 min … I want to give police time to catch up …

You need to edit

function ChopVehicle()
	ESX.TriggerServerCallback('Lenzh_chopshop:isCooldown', function(cooldown)
		if cooldown <= 0 then
			if Config.CallCops then
				local randomReport = math.random(1, Config.CallCopsPercent)
				print(Config.CallCopsPercent)
				if randomReport == Config.CallCopsPercent then
					TriggerServerEvent('drugsNotify')
				end
			end
			local ped = GetPlayerPed(-1)
			local vehicle = GetVehiclePedIsIn( ped, false )
        exports.pNotify:SendNotification({text = "Chopping vehicle, please wait...", type = "error", timeout = 36000, layout = "centerRight", queue = "right", animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}})

				SetVehicleEngineOn(vehicle, false, false, true)
				SetVehicleUndriveable(vehicle, false)
				SetVehicleDoorOpen(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0, false, false)
				Citizen.Wait(5000)
				SetVehicleDoorBroken(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0, true)
				Citizen.Wait(1000)
				SetVehicleDoorOpen(GetVehiclePedIsIn(GetPlayerPed(-1), false), 1, false, false)
				Citizen.Wait(5000)
				SetVehicleDoorBroken(GetVehiclePedIsIn(GetPlayerPed(-1), false), 1, true)
				Citizen.Wait(1000)
				SetVehicleDoorOpen(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, false, false)
				Citizen.Wait(5000)
				SetVehicleDoorBroken(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, true)
				Citizen.Wait(1000)
				SetVehicleDoorOpen(GetVehiclePedIsIn(GetPlayerPed(-1), false), 3, false, false)
				Citizen.Wait(5000)
				SetVehicleDoorBroken(GetVehiclePedIsIn(GetPlayerPed(-1), false), 3, true)
				Citizen.Wait(1000)
				SetVehicleDoorOpen(GetVehiclePedIsIn(GetPlayerPed(-1), false), 4, false, false)
				Citizen.Wait(5000)
				SetVehicleDoorBroken(GetVehiclePedIsIn(GetPlayerPed(-1), false),4, true)
				Citizen.Wait(1000)
				SetVehicleDoorOpen(GetVehiclePedIsIn(GetPlayerPed(-1), false), 5, false, false)
				Citizen.Wait(5000)
				SetVehicleDoorBroken(GetVehiclePedIsIn(GetPlayerPed(-1), false),5, true)
				Citizen.Wait(1000)
				DeleteVehicle()
				exports.pNotify:SendNotification({text = "Vehicle Chopped Successfully...", type = "success", timeout = 1000, layout = "centerRight", queue = "right", animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}})
			else
				ESX.ShowNotification(_U('cooldown', math.ceil(cooldown/1000)))
	    end
	end)
end

So the pnotify is where you add the total of all
SetVehicleDoorBroken and SetVehicleDooropen

Hope you understand now.

1 Like

Thank you … got this part and it is working fine …

Oh, i see you change your todo list. What a shame, i really liked this script but i was waiting for you to add deleting vehicles from db if it’s owned…

Its ment to be a criminal activity so chopping your own car wouldnt make sence as you would lose alot of money

Hey great script , but having a probleme with the cooldown witch isn4t working . Script is as it is in github , any ideas on a fix ?

i think you didn’t understand me, what i had on mind is if you steal somebody’s car that he bought in vehicle shop and it’s registered on him in database you could chop it and he will lose it forever (btw i’m not english native so sorry if i made some mistakes :slight_smile: )

For some reason I cant see the blip on the map and when I tp to the coordinates I dont see the blip on the floor to start anything

Did you download the latest version?

here all works , but there is nothing shown on map.

My bad i forgot to renable them in config when doing the pr. Just set to true in config guys.
Config.EnableBlips = true -- Set to false to disable blips.

Yes found , thanks hoy!

i get this error when i try to sell the items to the dealer

Just some constructive things, cooldown does not work, either end. No error codes popped up but users were able to keep chopping. Also the police notifications were alerting with the snapshot of the officers on duty and not the users chopping.

Overall we love it.

To make this script works, you have to use the resource folder name “lenzh_chopshop” instead of “Lenzh_chopshop-1.6”. Because in the script he uses GetCurrentResourceName(). and in main.lua in server folder remove the parameter ‘rewards’ in Reward(rewards) function in order to get the items

At this last version v1.6 the coldown doesn’t work, hope you can fix that soon, wish you all the best