62 lines
1.6 KiB
Lua
62 lines
1.6 KiB
Lua
if Config.Framework ~= "standalone" then return end
|
|
|
|
|
|
|
|
Core.Functions.GetPlayerVehicles = function(playerId)
|
|
if not playerId then
|
|
DebugPrint('Error: playerId is required')
|
|
return {}
|
|
end
|
|
|
|
local processedVehicles = {}
|
|
return processedVehicles
|
|
end
|
|
|
|
|
|
|
|
Core.Functions.GetVehicleData = function(playerId, plate)
|
|
if not playerId then
|
|
DebugPrint('Error: playerId is required')
|
|
return {}
|
|
end
|
|
|
|
local playerIdentifier = Core.Functions.GetIdentifier(playerId)
|
|
if not playerIdentifier then
|
|
DebugPrint('Error: Could not get player identifier for ID: ' .. tostring(playerId))
|
|
return {}
|
|
end
|
|
|
|
local vehicle = {}
|
|
|
|
return vehicle
|
|
end
|
|
|
|
|
|
local function WaitForEntity(entity)
|
|
local timer = GetGameTimer() + 5000
|
|
while not DoesEntityExist(entity) and timer > GetGameTimer() do
|
|
Wait(0)
|
|
end
|
|
return DoesEntityExist(entity)
|
|
end
|
|
|
|
function Core.Functions.CreateServerVehicle(model, coords, heading)
|
|
heading = heading or 0
|
|
local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z, heading, true, true)
|
|
if not WaitForEntity(vehicle) then
|
|
return
|
|
end
|
|
SetEntityIgnoreRequestControlFilter(vehicle, true)
|
|
return vehicle
|
|
end
|
|
|
|
function Core.Functions.CreateServerPed(model, coords, heading)
|
|
heading = heading or 0
|
|
local ped = CreatePed(4, model, coords.x, coords.y, coords.z, heading, true, true)
|
|
if not WaitForEntity(ped) then
|
|
return
|
|
end
|
|
SetEntityIgnoreRequestControlFilter(ped, true)
|
|
return ped
|
|
end
|