GM
dúvida

Quest+bag

Por gmstrikker, 02 de mai. de 2015 em Scripts

resolvido
2
883
gmstrikkerG
02 de maio de 2015 às 19:12

Como eu faço pras arrows do meu server vir dentro de uma bag especial a id 9774, vim a bag lotada de arrows?

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorageValue(cid, 7998) < 1 then
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a KIT ARROWS.")
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerSetStorageValue(cid, 7998, 1)
else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end

return TRUE
end
FurabioF
03 de maio de 2015 às 16:07
Melhor resposta

Assim ?

function onUse(cid)

	if getPlayerStorageValue(cid, 7998) < 1 then
	    local bag = doPlayerAddItem(cid, 9774, 1)
	    doAddContainerItem(bag, 2544, 2000)
	    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a KIT ARROWS.")
	    doPlayerSetStorageValue(cid, 7998, 1)
	else
	    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
	end

	return true
end

Tópico movido para a seção de dúvidas e pedidos resolvidos.

Editado Maio 2 por ScreaM