Bu gün çok basit bi şekilde artık polisler belirlediğiniz konumlarda /heli yazarak sizin belirlediğiniz helikopterleri çıkartabilir
Polisjobun cliente bu komutu yazdıktan sonra config kısmınada Config.Helilocation(belirlediğiniz konum) yazarak kullanabilirsiniz.
Kod:
RegisterCommand("heli",function()
if PlayerData.job ~= nil and PlayerData.job.name == 'police' then
for i=1, #Config.Helilocation, 1 do
local player = PlayerPedId()
local coords = GetEntityCoords(player, 0)
local AuthLocations = Config.Helilocation[i]
local Auth = GetDistanceBetweenCoords(AuthLocations, coords, true)
if Auth <= 50 then
local model = GetHashKey(Config.Helicopter)
local playerPed = PlayerPedId()
local coords = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 1.5, 6.0, 2.0)
local heading = GetEntityHeading(playerPed)
exports['progressbar']:Progress({
name = 'heli',
duration = 3000,
label = 'Helikopter Çıkartılıyor',
useWhileDead = true,
canCancel = true,
controlDisables = {
disableMovement = false,
disableCarMovement = false,
disableMouse = false,
disableCombat = true,
},
}, function(Cancelled)
ESX.Game.SpawnVehicle(model, coords, heading, function(vehicle)
SetVehicleLivery(vehicle, 2) --set police livery
Citizen.Wait(1000)
end)
end)
end
end
end
end)
Polisjobun cliente bu komutu yazdıktan sonra config kısmınada Config.Helilocation(belirlediğiniz konum) yazarak kullanabilirsiniz.
- Paylaşım Şifresi
- Yok