LockSystem, advanced lock system for vehicles.
Version 3.1 - Updated the 07/16/2018.
(Changelog at the end of post)
Thank you, but i won't develop on FiveM anymore for now
After a long waiting time, here is the new (and last) version of the LockSystem script. I won't work on it anymore because i stopped developing on FiveM. The code is Open Source and I invite you to contribute to the project on Github. You will find the contribution guide directly on the Github README page.
What is LockSystem
LockSystem is a script allowing to :
- Recover the keys of a vehicle with a percentage of success and customizable messages
- Lock / Unlock the cars that belong to you
- Give your keys with a chat command (Not tested, i can't do this alone)
- Recover your keys when disconnecting and reconnecting (reset keys when server restarts)
- Disable (or not) NPC cars
- Provide a mini API to help developers work with it
How it works
When you enter a vehicle (any vehicle), you can try to retrieve the keys by pressing the U key (default). A percentage success rate can be configured. If you find the keys, you can lock and open the vehicle and give your keys to someone else..
- Download and install the script
- Move the LockSystem folder in your FiveM resources
- Add start LockSystem in your server.cfg file
You can find the configuration in config/shared.lua.
The sounds are in the html/sounds/ folder.
The give keys command
Here is the command for give the keys. I haven't tried i, i hope it works. Otherwise, feel free to solve the problems and contribute to the project on Github.
/givekey <player id> <plate>
You will find all the necessary information in the files client_api.lua and server_api.lua.
Version 3.1 (07/16/2018)
Trunk problem should be resolved