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

Soru ESX UI Menü Title Gözükmüyor

  • Konbuyu başlatan SalwoX
  • Başlangıç tarihi
  • Cevaplar 4
  • Görüntüleme 328

SalwoX

Üye
FT Kullanıcı
Katılım
2 yıl 4 ay 8 gün
Mesajlar
6
Merhabalar. ESX menü tasarımını tam bilmediğimden sorunun çözümünü burada aramak zorunda kaldım.
Aşağıda belirteceğim kodlarda mevcut olmasına rağmen menüde title görünmüyor.

67979
Sol üstteki menünün üzerinde "Kıyafet satın almayı onaylıyor musunuz?" sorusunu yönlendirmem gerekiyor. Ne yaptıysam başaramadım. Eğer bu olmayacaksa da elinde başka esx menü scripti olan varsa ona da açığım. Yardımcı olur musunuz?
Kodlar:

client.lua
Kod:
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_main', {
      title    = ('Selamlar'),
      align    = 'top-left',
      elements = elements,
    }, function(data, menu)
    menu.close()

    if data.current.value == 'shop_clothes' then
    hasPaid = false

    TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu)
        menu.close()

        ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_confirm', {
            title = _U('valid_this_purchase'),
            align = 'top-left',
            elements = {
                {label = _U('yes'), value = 'yes'},
                {label = _U('no'), value = 'no'}
        }}, function(data, menu)
            menu.close()

            if data.current.value == 'yes' then
                ESX.TriggerServerCallback('esx_clotheshop:buyClothes', function(bought)
                    if bought then
                        TriggerEvent('skinchanger:getSkin', function(skin)
                            TriggerServerEvent('esx_skin:save', skin)
                        end)

                        hasPaid = true

                        ESX.TriggerServerCallback('esx_clotheshop:checkPropertyDataStore', function(foundStore)
                            if foundStore then
                                ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'save_dressing', {
                                    title = _U('save_in_dressing'),
                                    align = 'top-left',
                                    elements = {
                                        {label = _U('yes'), value = 'yes'},
                                        {label = _U('no'),  value = 'no'}
                                }}, function(data2, menu2)
                                    menu2.close()

                                    if data2.current.value == 'yes' then
                                        ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'outfit_name', {
                                            title = _U('name_outfit')
                                        }, function(data3, menu3)
                                            menu3.close()

                                            TriggerEvent('skinchanger:getSkin', function(skin)
                                                TriggerServerEvent('esx_clotheshop:saveOutfit', data3.value, skin)
                                                ESX.ShowNotification(_U('saved_outfit'))
                                            end)
                                        end, function(data3, menu3)
                                            menu3.close()
                                        end)
                                    end
                                end)
                            end
                        end)

                    else
                        ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
                            TriggerEvent('skinchanger:loadSkin', skin)
                        end)

                        ESX.ShowNotification(_U('not_enough_money'))
                    end
                end)
            elseif data.current.value == 'no' then
                ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
                    TriggerEvent('skinchanger:loadSkin', skin)
                end)
            end

            currentAction     = 'shop_menu'
            --currentActionMsg  = _U('press_menu')
            currentActionData = {}
        end, function(data, menu)
            menu.close()

            currentAction     = 'shop_menu'
            --currentActionMsg  = _U('press_menu')
            currentActionData = {}
        end)

    end, function(data, menu)
        menu.close()

        currentAction     = 'shop_menu'
        --currentActionMsg  = _U('press_menu')
        currentActionData = {}
    end, {
        'tshirt_1',
        'tshirt_2',
        'torso_1',
        'torso_2',
        'decals_1',
        'decals_2',
        'arms',
        'pants_1',
        'pants_2',
        'shoes_1',
        'shoes_2',
        'chain_1',
        'chain_2',
        'helmet_1',
        'helmet_2',
        'glasses_1',
        'glasses_2',
        'watches_1',
        'watches_2',
        'bracelets_1',
        'bracelets_2',
        'mask_1',
        'mask_2',
        'bproof_1',
        'bproof_2',
        'bags_1',
        'bags_2'
    })
end

      if data.current.value == 'player_dressing' then
        
        ESX.TriggerServerCallback('esx_bz_clotheshop:getPlayerDressing', function(dressing)
          local elements = {}

          for i=1, #dressing, 1 do
            table.insert(elements, {label = dressing[i], value = i})
          end

          ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'player_dressing', {
              title    = _U('player_clothes'),
              align    = 'top-left',
              elements = elements,
            }, function(data, menu)

              TriggerEvent('skinchanger:getSkin', function(skin)

                ESX.TriggerServerCallback('esx_bz_clotheshop:getPlayerOutfit', function(clothes)

                  TriggerEvent('skinchanger:loadClothes', skin, clothes)
                  TriggerEvent('esx_skin:setLastSkin', skin)

                  TriggerEvent('skinchanger:getSkin', function(skin)
                    TriggerServerEvent('esx_skin:save', skin)
                  end)
                  
                  ESX.ShowNotification(_U('loaded_outfit'))
                  HasLoadCloth = true
                end, data.current.value)
              end)
            end, function(data, menu)
              menu.close()
              
              CurrentAction     = 'shop_menu'
             -- CurrentActionMsg  = _U('press_menu')
              CurrentActionData = {}
            end
          )
        end)

server.lua

Kod:
ESX = nil

TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

RegisterServerEvent('esx_clotheshop:saveOutfit')
AddEventHandler('esx_clotheshop:saveOutfit', function(label, skin)
    local xPlayer = ESX.GetPlayerFromId(source)

    TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
        local dressing = store.get('dressing')

        if dressing == nil then
            dressing = {}
        end

        table.insert(dressing, {
            label = label,
            skin  = skin
        })

        store.set('dressing', dressing)
        store.save()
    end)
end)

ESX.RegisterServerCallback('esx_clotheshop:buyClothes', function(source, cb)
    local xPlayer = ESX.GetPlayerFromId(source)

    if xPlayer.getMoney() >= Config.Price then
        xPlayer.removeMoney(Config.Price)
        TriggerClientEvent('esx:showNotification', source, _U('you_paid', Config.Price))
        cb(true)
    else
        cb(false)
    end
end)

ESX.RegisterServerCallback('esx_clotheshop:checkPropertyDataStore', function(source, cb)
    local xPlayer = ESX.GetPlayerFromId(source)
    local foundStore = false

    TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
        foundStore = true
    end)

    cb(foundStore)
end)

ESX.RegisterServerCallback('esx_bz_clotheshop:getPlayerDressing', function(source, cb)
  local xPlayer  = ESX.GetPlayerFromId(source)

  TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
    local count    = store.count('dressing')
    local labels   = {}

    for i=1, count, 1 do
      local entry = store.get('dressing', i)
      table.insert(labels, entry.label)
    end

    cb(labels)
  end)
end)

ESX.RegisterServerCallback('esx_bz_clotheshop:getPlayerOutfit', function(source, cb, num)
  local xPlayer  = ESX.GetPlayerFromId(source)

  TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
    local outfit = store.get('dressing', num)
    cb(outfit.skin)
  end)
end)

RegisterServerEvent('esx_bz_clotheshop:deleteOutfit')
AddEventHandler('esx_bz_clotheshop:deleteOutfit', function(label)
    local xPlayer = ESX.GetPlayerFromId(source)

    TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
        local dressing = store.get('dressing')

        if dressing == nil then
            dressing = {}
        end

        label = label
        
        table.remove(dressing, label)

        store.set('dressing', dressing)
    end)
end)

locale/tr.lua
Kod:
Locales['tr'] = {
    ['valid_this_purchase'] = 'Satın almayı onaylıyor musun?',
    ['yes'] = 'evet',
    ['no'] = 'hayır',
    ['name_outfit'] = 'Kıyafetinin ismi ne olsun?',
    ['not_enough_money'] = 'Yeterince paran yok',
    ['press_menu'] = '~b~Kıyafet Mağazasına~w~ açmak için ~INPUT_CONTEXT~ tuşuna basın.',
    ['clothes'] = 'Kıyafet Mağazası',
    ['you_paid'] = '$%s ödedin',
    ['save_in_dressing'] = 'Kıyafetinin ismi ne olsun?',
    ['shop_clothes'] = 'Kıyafet Mağazası',
    ['player_clothes'] = 'Kıyafet Dolabı',
    ['shop_main_menu'] = 'Hoşgeldin, nasıl yardımcı olabiliriz?',
    ['saved_outfit'] = 'Kıyafetin dolabına kaydedildi.',
    ['loaded_outfit'] = 'Dolabından kıyafetini giydin',
    ['suppr_cloth'] = 'Kıyafet Sil',
    ['supprimed_cloth'] = 'Kıyafetin dolabından silindi'

}
 
Konu tarafımca doğru kategoriye taşınmıştır
 
pek bi fikrim yok ama esx_menu_default script'inde sıkıntı olabilir. Yenisi kurup oyle deneyebilirsin.
 
Merhaba, verilen cevap doğrultusunda sorununuz çözüme ulaştımı ?
 
Evet, default menü değiştirince problemim çözüldü, teşekkür ediyorum.
 

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!