Skip to content

Commit

Permalink
refactor(server): add check to vehicle swap
Browse files Browse the repository at this point in the history
  • Loading branch information
solareon committed Sep 26, 2024
1 parent 8ecd9e1 commit a9de235
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ local function checkVehicleList(vehicle, shop)
return false
end

---@param data {toVehicle: string}
RegisterNetEvent('qbx_vehicleshop:server:swapVehicle', function(data)
if not checkVehicleList(data.toVehicle) then return end
TriggerClientEvent('qbx_vehicleshop:client:swapVehicle', -1, data)
end)

---@param source number
---@return string?
local function getShopZone(source)
Expand Down

0 comments on commit a9de235

Please sign in to comment.