T1GER Keys
Documentation, troubleshooting and support for T1GER Keys resource.
Last updated
Documentation, troubleshooting and support for T1GER Keys resource.
Last updated
Dependency | Download | Install | Description |
ProgressBars | Optional | If not using, set |
Extractt1ger_keys.rar
and place it into your resource folder.
Install the SQL file into your database (⚠️see #SQL for instructions).
Install and ensure dependencies for the resource.
Setupconfig.lua
(⚠️see #CONFIGURATION for instructions).
Addensure t1ger_keys
to your server start config (place it anywhere below the dependency & framework resources).
Update the SetVehicleDoorsLocked() native in all your resources to use my export function instead (see instructions here)
Please note, there are two SQL files, you only need to use one of them, depending on whether you had my oldt1ger_keys
resource installed or not.
If you already havegotKey
andalarm
columns in yourowned_vehicles
table in database, then uset1ger_keys_update.sql
file.
Otherwise, you can use thet1ger_keys_add.sql
file.
You can open the respective SQL file, copy the queries and execute/run them in your database manually (my personal preferred way) or you can import the file.
Please go through all configurable options & settings in config.lua
and configure them to your server's preferences.
Also please read the comments at the end of each line, for a brief information on what the option does.
Inclient/utils.lua
there is a file where you can edit some utility functions. In here you can customize notifications, draw texts and many other functions.
Please do read it through and make changes to meet your server's preferences.
You need to replace theSetVehicleDoorsLocked()
native with my export function below. This is because my resource uses decors which syncs much better and when using the native to lock/unlock a vehicle, the decors of the vehicle aren't updated, meaning you'd face syncing issues.
Best and easiest way to replace, is simply search forSetVehicleDoorsLocked(
in your files and replace with my export function. Reminder; make sure to set the correct variables for vehicle and int, they have to be the exact same as you had in the native you replaced/about to replace.
If you don't want vehicles locked by default when spawned, then manually add the export function and set theint
to either0
or1
.
I have added the export inside myESX.Game.SpawnVehicle()
function, so all my resources using this function, will automatically set vehicles to be unlocked. For resources not using that function, you'd need to add the export in manually in the script.
Follow these instructions to add keys for player or jobs for a vehicle.
To add job keys for a vehicle used for a job, use this export function in your client-sided files:
CLICK THE TABS TO SEE OPTIONS
This example shows how to add job keys for a player and not allowing any jobs to have access to the vehicle.
To add temporary keys to a vehicle for player, you need to use this export function in your client-sided files.
VEHICLE MUST EXIST IN DATABASE, ONLY AFTER THE FUNCTION OR TRIGGERSERVEREVENT MUST BE USED.
To add keys for owned vehicle, which are permanent, it requires the vehicle to be registered inowned_vehicles
table in the database (of course, otherwise it wouldn't be an owned vehicle).
CLICK THE TABS TO SEE OPTIONS
Use this export function to add keys from a server-sided environment:
Please note, all these command strings are configurable and can be disabled as well.
Command | Description |
| Locks or unlocks the closest vehicle or the vehicle player is in. |
| Opens menu showing all current keys a player has. |
| Opens the car interaction menu (doors, windows, engine, neon and keys) |
| Toggles engine on/off depending on its running state. |
| Triggers the lockpick event/function |
| Search the car for loot if possible. |
| Hotwire vehicle to turn on the engine |
These are available exports in the resource - use them as you please and find necessary.
Export Function | Description |
| Sets the vehicle locked status using decors and handles the door lock sync properly for the vehicle. More info here. |
| Returns the locked status integer for a given vehicle. Use this function to check if vehicle is locked. Replace this native with the export function, to get better synced results. |
| By default vehicles cannot be searched (unless its enabled for different events in config). Use this export on a given vehicle to allow searching it once. Boolean must be |
| By default vehicles does not require hotwiring (unless its enabled for different events in config). Use this export on a given vehicle to require a hotwiring to start the engine. Boolean must be |
| Toggle vehicle engine, depending on its running state. The vehicle variable is not necessary to be sent, function will check for the vehicle player is in. |
VEHICLE NAME NULL ❓ My vehicles show up as NULL and not by name.
✔️ Please read this post on CFX Forum on how to properly add custom vehicles to your server. If that didn't fix your issue, then find the respectivevehicles.meta
file (typically located in your stream folder for the given vehicle). In here you want to set the<gameName>
property to match the given vehicle mode in yourvehicles
table in database. There is a youtube guide here, I don't understand the language but the video itself should give you an idea.
🆘 IF YOU HAVE TRIED YOUR BEST AND NOTHING WORKS, THEN CONTACT US ON OUR OFFICIAL DISCORD: CLICK HERE.