Framework Optimization

for optimization of other resources.
This commit is contained in:
KamuiKody
2022-09-04 22:51:27 -04:00
parent aadf09937e
commit 8386143cd7
2 changed files with 56 additions and 0 deletions
+12
View File
@@ -117,6 +117,18 @@ RegisterNetEvent('QBCore:Command:GoToMarker', function()
end)
-- Vehicle Commands
RegisterNetEvent('QBCore:Client:VehicleInfo', function(info)
local data = {
vehicle = NetToVeh(info.netid),
seat = info.seat,
name = info.modelName,
plate = QBCore.Functions.GetPlate(info.vehicle),
driver = GetPedInVehicleSeat(info.vehicle, -1),
inseat = GetPedInVehicleSeat(info.vehicle, info.seat),
haskeys = exports['qb-vehiclekeys']:HasKeys(plate)
}
TriggerEvent('QBCore:Client:'..info.event..'Vehicle', data)
end)
RegisterNetEvent('QBCore:Command:SpawnVehicle', function(vehName)
local ped = PlayerPedId()