Postado Julho 21, 2014 10 anos Então gente seguinte tenho esse script de encher staminia meu ot baiak e tals so que tpw ele ta meio bugado no seguinte certo era vc usar o item e encher a staminia mais oq acontece o player usa aparece la que encheu a staminia mais n enche continua baixa isso tornando o iten do rec infinito...agora se eu decho ele em cargas tpw usou uma vez ele some ae funciona enche a staminia por completo... function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") elseif(not isPremium(cid)) then doPlayerSendCancel(cid, "You must have a premium account.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") doRemoveItem(item.uid) end return true end no caso pra dechar ele infinito seria tirar essa parte aki " doRemoveItem(item.uid) " certo? então eu retiro mais ele buga n encher a staminia alguem sabe pq?
Postado Julho 21, 2014 10 anos function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") elseif(not isPremium(cid)) then doPlayerSendCancel(cid, "You must have a premium account.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") end return true end Tu so quer deixar infinito? testa agora.
Postado Julho 21, 2014 10 anos Autor continua dando o mesmo erro o player usa aparece a mensagem que a staminia encheu mais não enche :/ up
Postado Julho 21, 2014 10 anos @ludgeromf1, qual seu TFS? function onUse(cid, item, fromPosition, itemEx, toPosition) local refuel = 42 * 60 * 1000 if isPremium(cid) then if(getPlayerStamina(cid) < refuel) then doPlayerSetStamina(cid, refuel) doPlayerSendTextMessage(cid, 22, 'Your stamina has been refilled.') else doPlayerSendCancel(cid, 'Your stamina is already full.') end else doPlayerSendCancel(cid, 'You must have a premium account.') end return true end STYLLER OT 2022
Postado Julho 21, 2014 10 anos Autor creio que seja 0.3.6 e continua dando o mesmo erro :/ up Editado Julho 21, 2014 10 anos por ludgeromf1 (veja o histórico de edições)
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.