RemoveKeys
The RemoveKeys
export allows you to revoke a player's access to a specified vehicle by removing its keys. This is useful for scenarios such as repossessions, administrative actions, or vehicle ownership changes.
Obtain the Plate Natively
To use the RemoveKeys
export, you need the vehicle's plate and model. Use the following code snippet to retrieve these values:
With these values, you can accurately identify the vehicle for which the keys should be removed.
How to Use
To remove keys from a player, use the following code:
plate: The license plate of the vehicle.
model: The model of the vehicle.
Example
Here’s an example of how to use the RemoveKeys
export in a script:
This export provides an efficient way to manage vehicle access dynamically. Use it in scenarios such as player penalties, vehicle ownership adjustments, or administrative commands to maintain control over vehicle keys.
Last updated