Hand made, simple plug-n-play car locking script, just a bit nicer looking!
Default Keybind : [“U”]
Features:
Car Locking Ped Animation
Car Horn Beep (if outside vehicle)
Displays in Notification the Cars Number Plate
Notifying you that it’s locked (thanks to ox_lib notify)
Fixed common bugs with cars remaining locked
–UPDATED–
2 Different notifications, if you have ox_lib on your server (HIGHLY recommend) then you can use the green notification, if not, the basic ESX notification will do, just tab out the one you don’t want to use in the client script. I have removed the use of SkeexsNotify.
Yes and no - as spawned in vehicles have no owner (not to pin to an identifier or anything)
I mean it’s possilbe (not logical) to have a script where someone with the right job allows them to lock any of that jobs’ vehicle (by model name i.e Model:Policex5 or something) but that could cause a lot of problems lmao.
Your best bet is to have all of those vehicles either owned by a society (if you’re using ESX, most job scripts have Config.EnableSocietyOwnedVehicles or whatever) which then can be tied to a job that’s lockable, or just have your players jobs purchase vehicles through a garage, thus meaning they own the vehicle - this method has been the workaround for years
I also came to think about that, at some point but also realize that the scripts that do not save vehicles from works with the owner, such as when they take them to the workshop for tuning, when saving and removing them again, the thuning is not saved because the work It generates it instantly and it does not allow you to block your vehicle because it does not register it with the owner.
i used a free script and edited it myself so that emergency vehicles and utility vehicles like tow trucks and the mule or non owned vehicles will have essentially a free key. no job checks. i would say just grab a simple one and edit it. i use 2 scripts. this one and another. its not the best but its the quick solution. eventually ill just merge the two. but 2 separate gives me the freedom to grab a non owned. and owned quickly. no issues on locking either.