hasKey
hasKey is an ox_lib callback function, it may be used in all sorts of functions when a player has to be verified if they have a key of a plate.
plate: string
identifier: string
isPlayerID: bool
- if true the identifier must be the target server id.
- Callback
- Await
- isPlayerId
lib.callback('op-vehlock:hasKey', false, function(hasKey)
if hasKey then
-- Player has the correct key
else
-- Player does not have the correct key.
end
end, plate, identifier, isPlayerID)
local hasKey = lib.callback.await('op-vehlock:hasKey', false, plate, identifier, isPlayerID)
if hasKey then
-- Player has the correct key
else
-- Player does not have the correct key.
end
In this case the identifier
must be a target server id.
lib.callback('op-vehlock:hasKey', false, function(hasKey)
if hasKey then
-- Player has the correct key
else
-- Player does not have the correct key.
end
end, plate, identifier, true)