BlackFullMoon 1
BlackFullMoon
Mt2Hizmet 1
Mt2Hizmet
mavzermete 1
mavzermete
Vahsi Uzman 1
Vahsi Uzman
kralhakan2009 1
kralhakan2009
farkmt2official 1
farkmt2official
Bvural41 1
Bvural41
Hikaye Ekle

FiveM - Polislerin EMS'leri Haritada Görebilmesi

Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!

Aşağıdaki işlemler sonrasında police permine sahip oyuncular haritayı açtıklarında EMS birimlerini haritada blip olarak görebilecek.

ADIM 1: esx_policejob>client>main.lua içerisinden aşağıdaki kod bloğunu bulun.

Kod:
function createBlip(id)
    local ped = GetPlayerPed(id)
    local blip = GetBlipFromEntity(ped)

    if not DoesBlipExist(blip) then
        blip = AddBlipForEntity(ped)
        SetBlipSprite(blip, 1)
        SetBlipColour(blip,38)
        ShowHeadingIndicatorOnBlip(blip, true)
        SetBlipRotation(blip, math.ceil(GetEntityHeading(ped)))
        SetBlipNameToPlayerName(blip, id)
        SetBlipScale(blip, 0.85)
        SetBlipAsShortRange(blip, true)
     
        table.insert(blipsCops, blip)
    end
end

ADIM 2: Alt satırına aşağıdaki kodu yapıştırın

Kod:
function createBlip2(id)
    local ped = GetPlayerPed(id)
    local blip = GetBlipFromEntity(ped)

    if not DoesBlipExist(blip) then
        blip = AddBlipForEntity(ped)
        SetBlipSprite(blip, 1)
        SetBlipColour(blip,64)
        ShowHeadingIndicatorOnBlip(blip, true)
        SetBlipRotation(blip, math.ceil(GetEntityHeading(ped)))
        SetBlipNameToPlayerName(blip, id)
        SetBlipScale(blip, 0.85)
        SetBlipAsShortRange(blip, true)
     
        table.insert(blipsCops, blip)
    end
end

ADIM 3: Aşağıdaki kod bloğunu bulun

Kod:
 if PlayerData.job ~= nil and PlayerData.job.name == 'police' then
        ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players)
            for i=1, #players, 1 do
                if players[i].job.name == 'police' then
                    local id = GetPlayerFromServerId(players[i].source)
                    if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
                        createBlip(id)
                    end
                end
            end
        end)
    end

ADIM 4: Alt satırına aşağıdaki kodu yapıştırın

Kod:
if PlayerData.job ~= nil and PlayerData.job.name == 'police' then
        ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players)
            for i=1, #players, 1 do
                if players[i].job.name == 'ambulance' then
                    local id = GetPlayerFromServerId(players[i].source)
                    if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
                        createBlip2(id)
                    end
                end
            end
        end)
    end

esx_policejob scriptine restart attığınızda artık polisler harita üzerinde EMS birimlerini görebilecek.

1567836889431.png
 
Son düzenleme:

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst