TEMEL EŞYALAR BÖLÜMÜ ÇALIŞMIYOR
TIKLAYINCA KARAKTERİN ELİNE GELMİYOR
YARDIM EDENLERDEN ŞİMDİDEN TEŞEKKÜRLER
Mesaj Birleştirildi: 16 Ağustos 2022, 10:30:49
function addWeapon(leaf, amount)
if type(leaf) ~= 'table' then
leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist')
amount = getControlNumber(wndWeapon, 'amount')
if not amount or not leaf or not leaf.id then
return
end
end
if amount < 1 then
errMsg("Invalid amount")
return
end
server.giveMeWeapon(leaf.id, amount)
end
wndWeapon = {
'wnd',
text = 'Temel eşya',
width = 250,
controls = {
{
'lst',
id='weaplist',
width=230,
height=200,
columns={
{text='Eşyalar', attr='name'}
},
rows={xml='data/weapons.xml', attrs={'id', 'name'}},
onitemdoubleclick=function(leaf) addWeapon(leaf, 1500) end,
DoubleClickSpamProtected=true
},
{'br'},
{'txt', id='amount', text='500', width=70},
{'btn', text='Kullan', onclick=addWeapon, width='70'},
{'btn', text='Kapat', closeswindow=true, width='70'}
}
}