Skip to content

Commit

Permalink
fix(server): use givekeys export correctly (#70)
Browse files Browse the repository at this point in the history
* refactor(server): use vehicle entity from spawnvehicle

* chore: revert editorconfig linefeed change

---------

Co-authored-by: Solareon <[email protected]>
  • Loading branch information
Swellington-Soares and solareon authored Sep 29, 2024
1 parent 9413201 commit 5e255b9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RegisterNetEvent('qbx_admin:server:sendReply', function(report, message)
local name = GetPlayerName(source)

TriggerClientEvent('chatMessage', report.senderId, "", {255, 0, 0}, string.format('[REPORT #%s] [%s] ^7%s', report.id, name, message))

exports.qbx_core:Notify(source, locale('success.sent_report_reply'), 'success')
if REPORTS[k].claimed == 'Nobody' then
REPORTS[k].claimed = name
Expand Down Expand Up @@ -289,15 +289,13 @@ end)

lib.callback.register('qbx_admin:server:spawnVehicle', function(source, model)
local ped = GetPlayerPed(source)
local netId = qbx.spawnVehicle({
local netId, vehicle = qbx.spawnVehicle({
model = model,
spawnSource = ped,
warp = true,
})

local plate = qbx.getVehiclePlate(NetworkGetEntityFromNetworkId(netId))

exports.qbx_vehiclekeys:GiveKeys(source, plate)
exports.qbx_vehiclekeys:GiveKeys(source, vehicle)
return netId
end)

Expand Down

0 comments on commit 5e255b9

Please sign in to comment.