Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Question Smartphone valet error

eienix

Bronze Elite
Joined
May 7, 2022
Messages
12
Reaction score
3
Points
166
Location
turkey
I'm calling the car from the car garage application by clicking on the button that says 'valet,' but it's giving me this error.

SCRIPT EROR: @qb-core/client/functions.lua90: invalid vector field: h
 

eienix

Bronze Elite
Joined
May 7, 2022
Messages
12
Reaction score
3
Points
166
Location
turkey
QBCore.Functions.SpawnVehicle = function(model, cb, coords, isnetworked)
local modelHash = (type(model) == "number" and model or GetHashKey(model))

Citizen.CreateThread(function()
if not IsModelValid(modelHash) then return end
RequestModel(modelHash)
while not HasModelLoaded(modelHash) do
Citizen.Wait(1)
end

if coords == nil then
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
local playerHeading = GetEntityHeading(playerPed)
coords = { x = playerCoords.x, y = playerCoords.y, z = playerCoords.z, heading = playerHeading }
end

local vehicle = CreateVehicle(modelHash, coords.x, coords.y, coords.z, coords.h, isnetworked, false)
local timeout = 0

if isnetworked then
local networkId = NetworkGetNetworkIdFromEntity(vehicle)
SetNetworkIdCanMigrate(networkId, true)
SetVehicleHasBeenOwnedByPlayer(vehicle, true)
end

SetEntityAsMissionEntity(vehicle, true, false)
SetVehicleNeedsToBeHotwired(vehicle, false)
SetVehRadioStation(vehicle, 'OFF')
SetModelAsNoLongerNeeded(modelHash)
RequestCollisionAtCoord(coords.x, coords.y, coords.z)

while not HasCollisionLoadedAroundEntity(vehicle) and timeout < 2000 do
Citizen.Wait(0)
timeout = timeout + 1
end

if cb then
cb(vehicle)
end
end)
end

full code
 

ithorfsu

Silver Elite
Joined
Dec 4, 2021
Messages
20
Reaction score
215
Points
306
Location
Ireland
Which line is line 90 though? And is that from the valet script or the actual qb-core/client/functions.lua code
 

eienix

Bronze Elite
Joined
May 7, 2022
Messages
12
Reaction score
3
Points
166
Location
turkey
local vehicle = CreateVehicle(modelHash, coords.x, coords.y, coords.z, coords.h, isnetworked, false)
 
Top