Admin Commands
/givecar
Gives a vehicle to an **online** player by inserting it into the vehicle d
Usage
/givecar <playerId> <model>Arguments
playerId:numberThe server ID of the target player (must be connected).model:stringThe vehicle spawn name (example:t20,adder,sultan).
Where you can use it
Can be executed while inside a vehicle or on foot.
The target player must be online.
What it does
Generates a unique plate (checks the DB to avoid duplicates).
Normalizes the model name (lowercase, no spaces).
Creates a clean default vehicle props payload (fuel/engine/body defaults).
Inserts the vehicle into your detected vehicles table:
[esx]
owned_vehicles(stores model name + JSON props inmodsif available)[qb] [qbox]
player_vehicles(stores model string + hash + JSON props + condition)
Notifies:
The admin who ran the command
The target player
Notes
This command does not spawn the vehicle automatically in the world; it adds it to ownership/garage storage (depending on your system flow).
If your ESX schema does not have
mods, the script can create it (LONGTEXT) if configured to do so.
/dvcar
Deletes a vehicle from the database by plate.
Usage
Arguments
plate:stringThe plate to remove (spaces are ignored during normalization).
Where you can use it
Can be executed while inside a vehicle or on foot.
What it does
Normalizes the plate (uppercase, removes spaces).
Deletes the matching record from the detected vehicles table:
[esx]
owned_vehicles[qb] [qbox]
player_vehicles
Sends a result message:
Success if a row was deleted
Error if the plate was not found
Notes
This deletes the vehicle from the database. If the vehicle is currently spawned in the world, it will remain spawned until your cleanup logic removes it.
/changeplate
Changes the plate of an owned vehicle, updating both:
the plate column in the DB
the plate stored inside the vehicle JSON props
It also optionally updates inventory tables if present.
Usage
Arguments
oldPlate:stringThe current plate in the database.newPlate:stringThe new plate to apply.
Rules / Validation
newPlatemust be max 8 characters (spaces not allowed after normalization).newPlatemust be different fromoldPlate.newPlatemust not exist already in the database.
Where you can use it
Can be executed while inside a vehicle or on foot.
What it does
Updates the main vehicle row:
Sets the new plate in the plate column.
Updates the stored JSON props to keep plate consistent:
[qb] [qbox] updates
mods/propsJSON.[esx] updates
mods/propsJSON when available, otherwise falls back to legacy storage (if JSON is stored invehiclein older schemas).
Optional: if these tables exist, it updates them too:
trunkitemsgloveboxitems
Notes
This command is designed to prevent “split plates” where the DB plate differs from the JSON plate.
If you run custom trunk/glovebox systems with different table names, those will not be updated unless you add them.
Last updated
