-=[TFS]=- 0.4 8.60 - Eu queria que bp se não tivesse espaço no iventario caisse no chão com dinheiro dentro da bp ou isse pro depot nome das town id DexSoft
functiononUse(cid, item, frompos, item2, topos)ifitem.uid == 1624thenifgetPlayerStorageValue(cid, 1624) == -1thenifgetPlayerLevel(cid) >= 0then-- Adiciona as mochilas de ID 10518 ao inventário do jogadorfori = 1, 42doifnotdoPlayerAddItem(cid, 10518, 1) then
doPlayerSendCancel(cid, "Você não tem espaço suficiente para as mochilas.")returntrueendend-- Adiciona 1000 moedas (ID 2159) dentro de uma mochila (ID 10518) e repete 100 vezesfori = 1, 100dolocalbackpack = doCreateItemEx(10518, 1)ifbackpack ~= 0thenforj = 1, 42do
doAddContainerItem(backpack, 2159, 1000)end
doPlayerAddItemEx(cid, backpack, false)else
doPlayerSendCancel(cid, "Você não tem espaço suficiente para as mochilas.")returntrueendend
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Você ganhou um prêmio.")
setPlayerStorageValue(cid, 1624, 1)else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa ser level 0 para usar.")endelse
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já pegou o bônus.")endendreturntrueend
Question
Muvuka 1
Link to comment
Share on other sites
3 answers to this question
Recommended Posts