Skip to content

Commit

Permalink
feat: specify give vehicle key function via Config
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Nov 15, 2023
1 parent 03003ed commit a7c3ff6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,7 @@ Config.StarterItems = { -- Character starting items
end
},
}

Config.GiveVehicleKeys = function(src, plate)
exports.qbx_vehiclekeys:GiveKeys(src, plate)
end
2 changes: 1 addition & 1 deletion server/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ lib.addCommand('car', {
if not args then return end
local netId = SpawnVehicle(source, args[Lang:t("command.car.params.model.name")], nil, true)
local plate = GetPlate(NetworkGetEntityFromNetworkId(netId))
exports.qbx_vehiclekeys:GiveKeys(source, plate)
Config.GiveVehicleKeys(source, plate)
end)

lib.addCommand('dv', {
Expand Down

0 comments on commit a7c3ff6

Please sign in to comment.