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 Disc-Inventoryhud item silme

qwerty3428

Üye
FT Kullanıcı
Katılım
3 yıl 6 ay 27 gün
Mesajlar
230
Merhaba, disc inventoryhud için yere atılan eşyanın direkt olarak silinmesini istiyorum.

es_extended/server/main.lua içinde ESX.CreatePickup satırlarını yorum satırı yaptım ama işlevi olmadı.


Kod:
RegisterServerEvent('esx:removeInventoryItem')
AddEventHandler('esx:removeInventoryItem', function(type, itemName, itemCount)
    local playerId = source
    local xPlayer = ESX.GetPlayerFromId(source)

    if type == 'item_standard' then
        if itemCount == nil or itemCount < 1 then
            xPlayer.showNotification(_U('imp_invalid_quantity'))
        else
            local xItem = xPlayer.getInventoryItem(itemName)

            if (itemCount > xItem.count or xItem.count < 1) then
                xPlayer.showNotification(_U('imp_invalid_quantity'))
            else
                xPlayer.removeInventoryItem(itemName, itemCount)
                local pickupLabel = ('~y~%s~s~ [~b~%s~s~]'):format(xItem.label, itemCount)
                --ESX.CreatePickup('item_standard', itemName, itemCount, pickupLabel, playerId)
                xPlayer.showNotification(_U('threw_standard', itemCount, xItem.label))
            end
        end
    elseif type == 'item_money' then
        if itemCount == nil or itemCount < 1 then
            xPlayer.showNotification(_U('imp_invalid_amount'))
        else
            local playerCash = xPlayer.getMoney()

            if (itemCount > playerCash or playerCash < 1) then
                xPlayer.showNotification(_U('imp_invalid_amount'))
            else
                xPlayer.removeMoney(itemCount)
                local pickupLabel = ('~y~%s~s~ [~g~%s~s~]'):format(_U('cash'), _U('locale_currency', ESX.Math.GroupDigits(itemCount)))
                --ESX.CreatePickup('item_money', 'money', itemCount, pickupLabel, playerId)
                xPlayer.showNotification(_U('threw_money', ESX.Math.GroupDigits(itemCount)))
            end
        end
    elseif type == 'item_account' then
        if itemCount == nil or itemCount < 1 then
            xPlayer.showNotification(_U('imp_invalid_amount'))
        else
            local account = xPlayer.getAccount(itemName)

            if (itemCount > account.money or account.money < 1) then
                xPlayer.showNotification(_U('imp_invalid_amount'))
            else
                xPlayer.removeAccountMoney(itemName, itemCount)
                local pickupLabel = ('~y~%s~s~ [~g~%s~s~]'):format(account.label, _U('locale_currency', ESX.Math.GroupDigits(itemCount)))
                --ESX.CreatePickup('item_account', itemName, itemCount, pickupLabel, playerId)
                xPlayer.showNotification(_U('threw_account', ESX.Math.GroupDigits(itemCount), string.lower(account.label)))
            end
        end
 
DF
Config de
Config.DeleteDropsOnStart = false

bunu

Config.DeleteDropsOnStart = true

yaparsan hallolur.
 
DF
Sorununuz çözüme ulaştı mı?
 
DF

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!