Skip to content

Commit

Permalink
fix(server/main): add back extra callback
Browse files Browse the repository at this point in the history
  • Loading branch information
BerkieBb committed May 11, 2024
1 parent d5dda5d commit 2275c95
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function HasKeys(source, plate)
end

-----------------------
---- Server Events ----
---- Events ----
-----------------------

-- Event to give keys. receiver can either be a single id, or a table of ids.
Expand Down Expand Up @@ -205,6 +205,19 @@ lib.callback.register('vehiclekeys:server:ToggleDoorState', function(source, net
-- This callback is not yet implemented
end)

---Returns if the vehicle is owned by a player or not
---@param plate string
---@return boolean
lib.callback.register('vehiclekeys:server:IsPlayerOwned', function(_, plate)
for _, v in pairs(keysList) do
if v[plate] then
return true
end
end

return false
end)

-----------------------
---- Threads ----
-----------------------
Expand Down

0 comments on commit 2275c95

Please sign in to comment.