ESX l LRP-Steal (Optimized)

not at the moment, but if we try we will put it :slight_smile:

Thank you for your great effort

But there is a problem.

Weapons can’t be stolen.

I wonder if this is the case.

You have to be very close so you can steal.

https://forum.cfx.re/t/release-esx-loot-the-dead-body/610796/50

Try checking the arrangements that were left there.

Thank you very much

But there is a problem

No matter how much I shoot, if I reconnect, the bullet is full.

The bullet is full when reconnected.

Look at the lines you have commented, it seems that:

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

This line should not be commented, change the notifications of the “mythic” to the “esx_notification”

CLIENT:

ESX.ShowNotification('YOUTEXTHERE')

SERVER:

xPlayer.showNotification('YOUTEXTHERE')

I leave some fixes to those who can’t see objects when they steal

https://github.com/Trsak/esx_inventoryhud/commit/f74fa457deb92c7a9db66b73c9760373356fce45

https://github.com/ESX-Org/es_extended/pull/322

https://github.com/Trsak/esx_inventoryhud/commit/f74fa457deb92c7a9db66b73c9760373356fce45

I also recommend seeing the link I left a long time ago, I also had that problem and fixed it with that.

https://forum.cfx.re/t/release-esx-loot-the-dead-body/610796/50

https://github.com/Trsak/esx_inventoryhud/commit/f74fa457deb92c7a9db66b73c9760373356fce45

https://github.com/ESX-Org/es_extended/pull/322

https://forum.cfx.re/t/release-esx-loot-the-dead-body/610796/50

That may be because we do not use the same animation to raise our hands, I already answered the same question to a person above.

send me your animation code to raise your hands

This is the code you use to make your hands, use the “X” key for people to raise their hands.

Use this code to see if it works for you.


handsup = false

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)

		if handsup == false then
			Citizen.Wait(50)
		end

		local lPed = GetPlayerPed(-1)
		RequestAnimDict("random@mugging3")
		if not IsPedInAnyVehicle(lPed, false) and not IsPedSwimming(lPed) and not IsPedShooting(lPed) and not IsPedClimbing(lPed) and not IsPedCuffed(lPed) and not IsPedDiving(lPed) and not IsPedFalling(lPed) and not IsPedJumping(lPed) and not IsPedJumpingOutOfVehicle(lPed) and IsPedOnFoot(lPed) and not IsPedRunning(lPed) and not IsPedUsingAnyScenario(lPed) and not IsPedInParachuteFreeFall(lPed) then
			if IsControlPressed(1, 323) then
				if DoesEntityExist(lPed) then
					--SetCurrentPedWeapon(lPed, 0xA2719263, true)
					Citizen.CreateThread(function()
						RequestAnimDict("random@mugging3")
						while not HasAnimDictLoaded("random@mugging3") do
							Citizen.Wait(100)
						end

						if not handsup then
							handsup = true
							TaskPlayAnim(lPed, "random@mugging3", "handsup_standing_base", 2.5, -2.5, -1, 49, 0, 0, 0, 0)
						end   
					end)
				end
			end
		end
		if IsControlReleased(1, 323) then
			if DoesEntityExist(lPed) then
				Citizen.CreateThread(function()
					RequestAnimDict("random@mugging3")
					while not HasAnimDictLoaded("random@mugging3") do
						Citizen.Wait(100)
					end

					if handsup then
						handsup = false
						ClearPedSecondaryTask(lPed)
					--	SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), true)
						
					end
				end)
			end
		end
	end
end)
1 Like

sion of mythic_notifi change the word DoCustomHudText to SendAlert

with that you solve the problem

mithyc_notific and progressBar must start before thehud inventory and the lrp-steal script.

also we leave the versions we use

2 Likes

progressBars-1.0 (1).zip (2.0 KB)

that error indicates that you do not have the progressBar, you are doing something wrong

What host do you use?

image

go the server/main line30 and send me what say!

i get the same problem on line 37:
if targetItem.limit ~= -1 and (targetItem.count + itemCount) > targetItem.limit then
else
sourceXPlayer.removeInventoryItem(itemName, itemCount)
targetXPlayer.addInventoryItem(itemName, itemCount)

u use es_extended with weight system??

Yea, Inventoryhud+shops and weight.

i Think yes.

This works with the item system by limit not by weight, if you want to make the change x database or script-

1 Like