GiveServerKeys
The GiveServerKeys
export is used to grant vehicle keys to a player server-side. This export is especially useful when you want to manage keys through server-side scripts, ensuring more secure and controlled key assignment.
How to Use
To give keys to a player for a specific vehicle, use the following parameters:
source: The player's server ID who will receive the keys.
plate: The license plate of the vehicle.
model: The vehicle model.
bypassKeyCheck: (Optional, default:
false
) Iftrue
, bypasses the key validation before granting the keys.
Here is an example of how to use this export:
Example Usage
This example assigns vehicle keys to a player when they purchase a vehicle from a server-side shop:
In this case, the export is used to securely grant keys to the player after they buy a vehicle. This ensures proper synchronization and ownership within the server.
Last updated