forked from Simnation/Main
ed
This commit is contained in:
parent
88ffeb3375
commit
87623c8379
27 changed files with 2865 additions and 1705 deletions
|
@ -0,0 +1,30 @@
|
|||
|
||||
local Ox = GetResourceState("ox_core") == "started" and exports["ox_core"] or nil
|
||||
|
||||
function IsOwnedVehicle(plate, vehicle)
|
||||
if (Ox) then
|
||||
return Ox:GetVehicle(vehicle)
|
||||
end
|
||||
|
||||
local results = Storage.IsVehicleOwned({ plate, Trim(plate) })
|
||||
|
||||
if (not results) then
|
||||
return false
|
||||
end
|
||||
|
||||
return #results > 0
|
||||
end
|
||||
|
||||
function StoreVehicle(plate, vehicle)
|
||||
if (Ox) then
|
||||
if (vehicle) then
|
||||
local oxVeh = Ox:GetVehicle(vehicle)
|
||||
if (oxVeh) then
|
||||
oxVeh.setStored()
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
Storage.StoreVehicleInGarage({ plate, Trim(plate) })
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue