Neler yeni

Foruma hoş geldin, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

Türkiye'nin İlk ve tek FiveM forum adresi

Forum adresimize hoş geldin FiveMTürk olarak amacımız siz değerli kullanıcılarımıza en aktif fikir ve paylaşım platformu sunmak bir yana en güvenilir şekilde alışveriş yapabileceğiniz bir platform sunmaktır.
DF DF
DF DF
DF DF

ESX_COMMUNİTYSERVİCE POLİCEJOBA ENTEGRE ETME

lonely1

Üye
FT Kullanıcı
Katılım
4 yıl 2 ay 19 gün
Mesajlar
51
Arkadaşlar merhaba,esx_communityservice scriptini nasıl policejoba entegre ederim yardım edebilirmisiniz?
 
F6 menüsüne mi
 

"Polis işi menüsüne nasıl eklenir."
esx_policejob: client/main.lua:
Kod:
{label = _U('fine'),            value = 'fine'},
--add code below (don't forget to add ',' before new row)
{label = "Community Service",    value = 'communityservice'}
        
elseif action == 'unpaid_bills' then
    OpenUnpaidBillsMenu(closestPlayer)
-- add code below
elseif action == 'communityservice' then
    SendToCommunityService(GetPlayerServerId(closestPlayer))
end

--add this function
function SendToCommunityService(player)
    ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'Community Service Menu', {
        title = "Community Service Menu",
    }, function (data2, menu)
        local community_services_count = tonumber(data2.value)
        
        if community_services_count == nil then
            ESX.ShowNotification('Invalid services count.')
        else
            TriggerServerEvent("esx_communityservice:sendToCommunityService", player, community_services_count)
            menu.close()
        end
    end, function (data2, menu)
        menu.close()
    end)
end
 

"Polis işi menüsüne nasıl eklenir."
esx_policejob: client/main.lua:
Kod:
{label = _U('fine'),            value = 'fine'},
--add code below (don't forget to add ',' before new row)
{label = "Community Service",    value = 'communityservice'}
       
elseif action == 'unpaid_bills' then
    OpenUnpaidBillsMenu(closestPlayer)
-- add code below
elseif action == 'communityservice' then
    SendToCommunityService(GetPlayerServerId(closestPlayer))
end

--add this function
function SendToCommunityService(player)
    ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'Community Service Menu', {
        title = "Community Service Menu",
    }, function (data2, menu)
        local community_services_count = tonumber(data2.value)
       
        if community_services_count == nil then
            ESX.ShowNotification('Invalid services count.')
        else
            TriggerServerEvent("esx_communityservice:sendToCommunityService", player, community_services_count)
            menu.close()
        end
    end, function (data2, menu)
        menu.close()
    end)
end
Nereye yazacağım bunu en aşağıyamı?
 
Dostum

"Polis işi menüsüne nasıl eklenir."
esx_policejob: client/main.lua:
Kod:
{label = _U('fine'),            value = 'fine'},
--add code below (don't forget to add ',' before new row)
{label = "Community Service",    value = 'communityservice'}
       
elseif action == 'unpaid_bills' then
    OpenUnpaidBillsMenu(closestPlayer)
-- add code below
elseif action == 'communityservice' then
    SendToCommunityService(GetPlayerServerId(closestPlayer))
end

--add this function
function SendToCommunityService(player)
    ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'Community Service Menu', {
        title = "Community Service Menu",
    }, function (data2, menu)
        local community_services_count = tonumber(data2.value)
       
        if community_services_count == nil then
            ESX.ShowNotification('Invalid services count.')
        else
            TriggerServerEvent("esx_communityservice:sendToCommunityService", player, community_services_count)
            menu.close()
        end
    end, function (data2, menu)
        menu.close()
    end)
end
Dostum,bunu nereye yazıcaz?en aşağıya yazdığımda policejob çalışmadı
 

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kayıt ol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Şimdi kayıt ol
Giriş yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş yap

Bu konuyu görüntüleyen kullanıcılar

Tema düzenleyici

Tema özelletirmeleri

Granit arka planlar

Lütfen Javascript'i etkinleştirin!Javascript'i etkinleştirin!