Postado Abril 26, 2017 8 anos Autor Gente por favor, estou precisando muito disso ou de qualquer outra maneira de adicionar stamina para todos do servidor de uma unica vez.
Postado Abril 26, 2017 8 anos Tenta esse local sto = 1010102 function onUse(cid, item, frompos, item2, topos) if (not isPlayer(cid)) then return false end if (getPlayerStorageValue(cid, sto) <= 0 and getPlayerStorageValue(cid, sto) < 2) then setPlayerStorageValue(cid, sto, 1) doPlayerSetStamina(cid, 201660000) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(MESSAGE_INFO_DESCR, "Your stamina is refueled.") else doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "Sorry, you cannot use this stamina refuel anymore.") end if getPlayerStorageValue(cid, sto) == 1 then setPlayerStorageValue(cid, sto, 2) doPlayerSetStamina(cid, 201660000) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(MESSAGE_INFO_DESCR, "Your stamina is refueled.") else doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "Sorry, you cannot use this stamina refuel anymore.") end return true end Editado Abril 26, 2017 8 anos por Weslley Kiyo (veja o histórico de edições)
Postado Abril 28, 2017 8 anos Autor Em 26/04/2017 ás 09:31, Weslley Kiyo disse: Tenta esse local sto = 1010102 function onUse(cid, item, frompos, item2, topos) if (not isPlayer(cid)) then return false end if (getPlayerStorageValue(cid, sto) <= 0 and getPlayerStorageValue(cid, sto) < 2) then setPlayerStorageValue(cid, sto, 1) doPlayerSetStamina(cid, 201660000) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(MESSAGE_INFO_DESCR, "Your stamina is refueled.") else doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "Sorry, you cannot use this stamina refuel anymore.") end if getPlayerStorageValue(cid, sto) == 1 then setPlayerStorageValue(cid, sto, 2) doPlayerSetStamina(cid, 201660000) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(MESSAGE_INFO_DESCR, "Your stamina is refueled.") else doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "Sorry, you cannot use this stamina refuel anymore.") end return true end Amigo agora esta dando esse erro: Lua Script Error: [Action Interface] data/actions/scripts/staminafull.lua:onUse data/actions/scripts/staminafull.lua:21: attempt to call global 'doPlayerSetStamina' (a nil value) stack traceback: [C]: in function 'doPlayerSetStamina' data/actions/scripts/staminafull.lua:21: in function <data/actions/scripts/staminafull.lua:3 Sabe o que pode ser? alguém por favor sabe me dizer o que pode estar errado ?
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.