GetServerKey
The GetServerKey
export checks if a specific player (identified by their server ID) has access to the keys for a particular vehicle. This is useful for validating ownership or permissions for server-side logic, such as locking or unlocking a vehicle.
How to Use
To check if a player has the key for a specific vehicle, use the following parameters:
source: The server ID of the player whose key access you want to verify.
plate: The license plate of the vehicle.
This export returns a boolean value:
true
: The player has access to the vehicle's keys.false
: The player does not have access.
Example usage:
Example Use Case
This example demonstrates checking if a player has the keys before allowing them to lock or unlock a vehicle:
In this case, the export checks the player's key ownership before performing any vehicle-related actions.
Last updated