0 Üye ve 1 Ziyaretçi konuyu incelemekte.
function urunAl( thePlayer ) if exports.global:hasItem(thePlayer,578,5) then exports.global:takeItem(thePlayer,578,5) outputChatBox("5 Adet Ürün Sildin",thePlayer,255,255,255,true) endend
Kodfunction urunAl( thePlayer ) if exports.global:hasItem(thePlayer,578,5) then exports.global:takeItem(thePlayer,578,5) outputChatBox("5 Adet Ürün Sildin",thePlayer,255,255,255,true) endendÖrnek kodda ki gibi oyuncu envanterinden 5 adet ürünü aynı anda silmek istiyorum ama fotoğraftaki gibi geldiği için ürünler hasItem a 5 değeri girince görmüyor hasItem olmasa bile takeItem da yine 5 yazdığı için silmiyor ama fonsiyon çalışıyorSpoiler for Hiden: Linki görebilmek için Kayıt olun yada Giriş yapın.
function urunAl( thePlayer ) local sayi = exports.item-system:countItems(thePlayer,578) if sayi < 5 then outputChatBox("yeterli miktarda ürünün yok",thePlayer) return end for i=1,5 do exports.global:takeItem(thePlayer,578) end outputChatBox("5 Adet Ürün Sildin",thePlayer,255,255,255,true)end