structura foldere
mutat kq- folders in un singur folder [kq]
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
function CheckSpawnCoordsIsFree(coords)
|
||||
local vehicles = GetAllVehicles()
|
||||
for k, v in pairs(vehicles) do
|
||||
local vehicleCoords = GetEntityCoords(v)
|
||||
local distance = #(coords - vec3(vehicleCoords.x, vehicleCoords.y, vehicleCoords.z))
|
||||
local plate = MathTrim(GetVehicleNumberPlateText(v))
|
||||
if distance < 3 then
|
||||
local existVehicle = GetVehicleFromPlate(plate)
|
||||
if not existVehicle then
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v)
|
||||
end
|
||||
goto continue
|
||||
end
|
||||
local existDriver = GetPedInVehicleSeat(v, -1)
|
||||
if existDriver == 0 then
|
||||
DeleteSpawnedVehicle(plate)
|
||||
goto continue
|
||||
end
|
||||
return false
|
||||
end
|
||||
::continue::
|
||||
end
|
||||
return true
|
||||
end
|
||||
Reference in New Issue
Block a user