yarka0000 1
yarka0000
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
farkmt2official 1
farkmt2official
Bvural41 1
Bvural41
Hikaye Ekle
Kaynak ikonu

POLİSLERİN EMS'LERİ HARİTADA GÖREBİLMESİ

  • Konuyu başlatan Konuyu başlatan ShineSun-Turkmmo
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 2
  • Görüntüleme Görüntüleme 543

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

Öncelikle Merhaba Fivem Kullanıcıları.
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)[/COLOR][/SIZE][/CENTER]
[SIZE=6][COLOR=rgb(251, 160, 38)][CENTER]    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)[/COLOR][/SIZE][/CENTER]
[SIZE=6][COLOR=rgb(251, 160, 38)][CENTER]    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[/COLOR][/SIZE][/CENTER]
[SIZE=6][COLOR=rgb(251, 160, 38)][CENTER]        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[/COLOR][/SIZE][/CENTER]
[SIZE=6][COLOR=rgb(251, 160, 38)][CENTER]        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.
 
Son düzenleme:

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

Geri
Üst