[FREE] Simple Vehicle lockpicking [ESX]

Yeaah because it removes the item upon failure…?

No i mean i cant actually use the Item it doesn’t let me.

then check serverside that its calling the right

ESX.RegisterUsableItem. Make sure its registering whatever your item is called in your Database.

Great release! One issue I’m coming across is I’m using F2 inventory to open inventory and drag the lockpick to use but get stuck on my inventory screen and cannot close. Minigame shows and works but only issue is myself and others get stuck on inventory screen.

Well, it’s for menu inventories so i suppose you need to call something else that closes the inventory screen rather than currently used esx menu closeall.

What’s the native I need to call? Do I add it to client side or server side? Also would it go on inventory resource or vehicle lock pick resource? Sorry for noobie questions, appreciate the response!

Sorry, i don’t know how high i have been typing my earlier response. Forgot it was usable item. I don’t know which inventory you are using and how it handles item using. Perhaps the problem is within the inventory system itself. If not you should figure out how you can force close the inventory on client. I suppose you’d just need to add the “native” on cl.lua > picklock function.

I think i know your problem, try put this lines like i did:

local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem(‘vehlockpick’, 1)


Goodluck!

1 Like

Hi, Please help me, can we use this script although open a door. Can you make it like a hotwire ? I mean, if we use this to open a NPC vehicles, they will run way, so if use this script to start an engine, it’s much better…help me please, i am looking for this script for a years…

1 Like

You could just implement it in your current vehicle locking system and add option to hotwire and just trigger the minigame when button is pressed. Then check if succeeded and use the native to turn engine on

great idea to use it for the door, well done :slight_smile:

sorry I dont know Why I cant use this script , there have no any error …

it’s subtracted but I’m getting an error help me

where is the line of code to comment out to npc carjack prevention

Client file, first thread

Hi, I try to add an police alert, from linden_outlawalert, but nothing happen when I failed a lockpick, I haven’t any errors, did you know from what that can come please ?