[Release][ESX] onyxLocksystem | Keys, Hotwiring

Yeah, I have read the code and saw these. Have you thought maybe about making the keys as item in the inventory?

I actually considered this at the start, but if you have keys to multiple cars it could clog up your inventory especially if you’re using scripts like esx_inventoryhud so I thought to take the more simple route for it. It’s definitely something I could add in for future releases when I get round to adding a config. Having it as just a toggle if you want that option or not.

That would be awesome to have since you can share keys, or maybe hand it over to other friend!

Yeah one thing I forgot to add in before I released it was a /givekeys command, that’ll come with the next update I suppose. It would essentially just get the vehicle plate and transfer it to the id of the person you want to give it to. But more options will be added when I get round to adding a config and rewriting some of the code to give people options in the script.

1 Like

Using this script has stopped any other script from being able to turn the vehicles off. Any ideas as to why?

Also needs the option that if you shoot an NPC out of a vehicle that is already being driven that you do not need the keys to drive it.

It’s probably to do with when the engine gets turned off when you enter a car without keys it disables auto start up and is likely messing with other script that will toggle engine status, I will fix this in the next version within the next few days. Thanks for notifying me of this

1 Like

I tried it there and on the line after the purchase was successful and still nothing. What’s the chances we could talk privately, I’d like to figure this out.

Have been working on other ways to get keys for vehicles today, will have an update out in a few days time.

1 Like

If you wait maybe 12 hours from now I’ll be working on adding keys when you buy a vehicle with esx_vehicleshop.

The snipet Zero two provided is how i did my esx vehicle spawn so you could probably do something similar.

local veh = GetVehiclePedIsIn(ped, vehicle)
local plate = GetVehicleNumberPlateText(vehicle)
			exports["onyxLocksystem"]:givePlayerKeys(plate)

Maybe try putting that after it spawns you into the vehicle?

1 Like

Huh right when I frankenstein myself something from two scripts that do all that something much nicer pops up :smiley:

Looks very clean!

Good job, maybe we can add a command like /givekey, it will automatically give key to the closest player using ESX.Game.GetClosestPlayer()

if u shoot a ai in the car does it give u keys automatically?

This is looking very very good my man. Keep it coming!

This script changed my life, first my wife left me and took the kids bit then this script cane around, as soon as I downloaded it my wife begged me for forgiveness and my boss stepped down and gave me his position as he realized I was the alpha male in the conpany. 10/10 good script all round

7 Likes

LoL, my favourite comment ever :joy:

:joy: :joy:

Not currently, but that’s coming very soon.

I’m sorry about your wife.

is there a code i can use to input somewhere to use a lockpick to modify engine in 3 stages like when you hotwire it