Postado Julho 18, 2016 9 anos galera adicionei quest no meu servidor, mas quando não tem cap ou espaço na backpack ele cai no chão. Alguém poderia colocar nessa script pra quando não tiver cap ou espaço na backpack ele avisa ao player que n tem cap ou espaço. Quem não conseguir colocar e mandar uma nova que funcione pode ser ;P \/ function onUse(cid, item, frompos, item2, topos) local config = { storage = 7777, -- change to your own storage value item = 11304, } if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, 1) doPlayerSendTextMessage(cid,25,"Você encontrou uma zaoan legs.") key = doPlayerAddItem(cid, config.item, 5) ~= -1 else doPlayerSendTextMessage(cid,25,"Está Vazio.") end return TRUE end Editado Julho 18, 2016 9 anos por helix758 (veja o histórico de edições) Meu servidor https://www.facebook.com/Heavennoobwar
Postado Julho 25, 2016 9 anos @helix758 Tente assim: Spoiler local config = { storage = 100008, -- change to your own storage value item = 7503 } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, config.storage) == 2 then if getPlayerFreeCap(cid) >= getItemWeightById(config.item, 1) then doPlayerSendTextMessage(cid,25,"You have found a heavy package.") doPlayerAddItem(cid, config.item, 1) setPlayerStorageValue(cid, config.storage, 3) setPlayerStorageValue(cid,100158, 5) else doPlayerSendTextMessage(cid, 25, "You need "..getItemWeightById(config.item, 1).." free cap.") end else doPlayerSendTextMessage(cid,25,"The chest is empty.") end return true end Obs: Se lhe ajudei, de um REP :D
Postado Julho 25, 2016 9 anos Autor 4 horas atrás, Mathwsz disse: @helix758 Tente assim: Ocultar conteúdo local config = { storage = 100008, -- change to your own storage value item = 7503 } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, config.storage) == 2 then if getPlayerFreeCap(cid) >= getItemWeightById(config.item, 1) then doPlayerSendTextMessage(cid,25,"You have found a heavy package.") doPlayerAddItem(cid, config.item, 1) setPlayerStorageValue(cid, config.storage, 3) setPlayerStorageValue(cid,100158, 5) else doPlayerSendTextMessage(cid, 25, "You need "..getItemWeightById(config.item, 1).." free cap.") end else doPlayerSendTextMessage(cid,25,"The chest is empty.") end return true end Obs: Se lhe ajudei, de um REP :D aí mano, infelizmente ao clika da essa msg -> The chest is empty e não ganha o item como estive ja feito a quest @Mathwsz aí cara, aquela sua script ficou dando como estive ja feito a quest, ai eu comecei a mexer e conseguir ajeitar -> mas tem um porem quando ele não tem espaço na backpack o item cai no chão mas o cap está funcionando poderia adiciona \/ quando não tiver espaço na backpack não cair no chão ? function onUse(cid, item, frompos, item2, topos) local config = { storage = 8889, -- change to your own storage value item = 2195, } if getPlayerStorageValue(cid, config.storage) == -1 then if getPlayerFreeCap(cid) >= getItemWeightById(config.item, 1) then doPlayerSendTextMessage(cid,25,"You have found a heavy package.") setPlayerStorageValue(cid, config.storage, 1) doPlayerSendTextMessage(cid,25,"Você encontrou uma boots of haste.") key = doPlayerAddItem(cid, config.item, 5) ~= -1 else doPlayerSendTextMessage(cid, 25, "You need "..getItemWeightById(config.item, 1).." free cap.") end else doPlayerSendTextMessage(cid,25,"Está Vazio.") end return TRUE end Meu servidor https://www.facebook.com/Heavennoobwar
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.