ESX l LRP-Steal (Optimized)

I use this animation for the hands up
TaskPlayAnim(lPed, “random@mugging3”, “handsup_standing_base”, 2.5, -2.5, -1, 49, 0, 0, 0, 0)

I will restart server and change the CFG

hi @Karenciitalove1 i have a really big problem with the script. everything works fine but if the target for example has 1 phone and the player write 11 and after steal it, he will take 11 phone. :frowning: you know how to fix this?


2 Likes

Hello, that is your inventory problem, look, maybe there is a bad line, it does not happen to us.

can you share your inventory?

3 Likes

what script do I use for the HansUP ?

1 Like

you mean the clothes?

1 Like

can i implement a /steal command and if yes how ?

For those who are using dpEmotes and the mythic progress bar on their server, do the following in order to make this script work properly.

So in order to make dpEmotes work with this script, we need to change this scrips animations with those from the dpEmotes script. This can be easily done by going to LRP-Steal > client.lua and replacing line 62:

 if IsEntityPlayingAnim(searchPlayerPed, 'random@mugging3', 'handsup_standing_base', 3) or IsEntityDead(searchPlayerPed) or GetEntityHealth(searchPlayerPed) <= 0 then

with:

if IsEntityPlayingAnim(searchPlayerPed, 'missminuteman_1ig_2', 'handsup_base', 3) or IsEntityDead(searchPlayerPed) or GetEntityHealth(searchPlayerPed) <= 0 then

Finally to change this scripts default progeress bar to the mythic progress bar, go to line 109 and replace:

RegisterNetEvent('robo:doarrested')
AddEventHandler('robo:doarrested', function()
	local target, distance = ESX.Game.GetClosestPlayer()
	Citizen.Wait(250)
	loadanimdict('combat@aim_variations@arrest')
	TaskPlayAnim(GetPlayerPed(-1), 'combat@aim_variations@arrest', 'cop_med_arrest_01', 8.0, -8,3750, 2, 0, 0, 0, 0)
	exports['progressBars']:startUI(3500, " Buscando Objetos ")	
	Citizen.Wait(3000)
	OpenBodySearchMenu(target)
end) 

with:

RegisterNetEvent('robo:doarrested')
AddEventHandler('robo:doarrested', function()
	local target, distance = ESX.Game.GetClosestPlayer()
	Citizen.Wait(250)
	loadanimdict('combat@aim_variations@arrest')
	TaskPlayAnim(GetPlayerPed(-1), 'combat@aim_variations@arrest', 'cop_med_arrest_01', 8.0, -8,3750, 2, 0, 0, 0, 0)
	
	TriggerEvent("mythic_progbar:client:progress", {
		name = "unique_action_name",
		duration = 3500,
		label = "Robbing",
		useWhileDead = false,
		canCancel = true,
		controlDisables = {
			disableMovement = true,
			disableCarMovement = true,
			disableMouse = false,
			disableCombat = true,
		},
		animation = {
			animDict = "combat@aim_variations@arrest",
			anim = "cop_med_arrest_01",
		}
	}, function(status)
		if not status then
			OpenBodySearchMenu(target)
		end
	end)
end) 

Hope that everything works now :wink:

This will probably solve your problem. Consider however installing the mythic progress bar to your server in order to make it work.

it works fine, but no weapons inside how to fix it ?

Does this also work on NPC’s?

Hey guys, why do I have this?

Above the map

Soooo Nice! Thanks!

is the inventoryhud…
you need to go there and add the job you allow to open the inventory

solo sirve en algunas ocasiones porque me pasa eso?

Is there a way to possibly get this to work with disc-inventoryhud?

1 Like

i get this whenever i search someone(look at the bottom left), but when i have the job set as a police it works perfectly fine, can someone help?

thats on your inventoryhud is not allow some jobs open other player inventory

Could you link disc inventory?