mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 17:23:31 +00:00
New plate function
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ RegisterNetEvent('QBCore:Command:SpawnVehicle', function(vehName)
|
|||||||
local vehicle = CreateVehicle(hash, GetEntityCoords(ped), GetEntityHeading(ped), true, false)
|
local vehicle = CreateVehicle(hash, GetEntityCoords(ped), GetEntityHeading(ped), true, false)
|
||||||
TaskWarpPedIntoVehicle(ped, vehicle, -1)
|
TaskWarpPedIntoVehicle(ped, vehicle, -1)
|
||||||
SetModelAsNoLongerNeeded(vehicle)
|
SetModelAsNoLongerNeeded(vehicle)
|
||||||
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(vehicle))
|
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(vehicle))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent('QBCore:Command:DeleteVehicle', function()
|
RegisterNetEvent('QBCore:Command:DeleteVehicle', function()
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ function QBCore.Functions.GetVehicleProperties(vehicle)
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
model = GetEntityModel(vehicle),
|
model = GetEntityModel(vehicle),
|
||||||
plate = QBCore.Shared.Trim(GetVehicleNumberPlateText(vehicle)),
|
plate = QBCore.Functions.GetPlate(vehicle),
|
||||||
plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
|
plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
|
||||||
bodyHealth = QBCore.Shared.Round(GetVehicleBodyHealth(vehicle), 0.1),
|
bodyHealth = QBCore.Shared.Round(GetVehicleBodyHealth(vehicle), 0.1),
|
||||||
engineHealth = QBCore.Shared.Round(GetVehicleEngineHealth(vehicle), 0.1),
|
engineHealth = QBCore.Shared.Round(GetVehicleEngineHealth(vehicle), 0.1),
|
||||||
|
|||||||
Reference in New Issue
Block a user