mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
+1
-1
@@ -120,7 +120,7 @@ end)
|
||||
|
||||
RegisterNetEvent('QBCore:Command:SpawnVehicle', function(vehName)
|
||||
local ped = PlayerPedId()
|
||||
local hash = GetHashKey(vehName)
|
||||
local hash = joaat(vehName)
|
||||
local veh = GetVehiclePedIsUsing(ped)
|
||||
if not IsModelInCdimage(hash) then return end
|
||||
RequestModel(hash)
|
||||
|
||||
@@ -434,7 +434,7 @@ function QBCore.Functions.GetBoneDistance(entity, boneType, boneIndex)
|
||||
end
|
||||
|
||||
function QBCore.Functions.AttachProp(ped, model, boneId, x, y, z, xR, yR, zR, vertex)
|
||||
local modelHash = type(model) == 'string' and GetHashKey(model) or model
|
||||
local modelHash = type(model) == 'string' and joaat(model) or model
|
||||
local bone = GetPedBoneIndex(ped, boneId)
|
||||
QBCore.Functions.LoadModel(modelHash)
|
||||
local prop = CreateObject(modelHash, 1.0, 1.0, 1.0, 1, 1, 0)
|
||||
@@ -447,7 +447,7 @@ end
|
||||
|
||||
function QBCore.Functions.SpawnVehicle(model, cb, coords, isnetworked, teleportInto)
|
||||
local ped = PlayerPedId()
|
||||
model = type(model) == 'string' and GetHashKey(model) or model
|
||||
model = type(model) == 'string' and joaat(model) or model
|
||||
if not IsModelInCdimage(model) then return end
|
||||
if coords then
|
||||
coords = type(coords) == 'table' and vec3(coords.x, coords.y, coords.z) or coords
|
||||
|
||||
Reference in New Issue
Block a user