Ir para conteúdo
Banner com Efeitos

Featured Replies

  • Respostas 8
  • Visualizações 630
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • N sei se funfa mas tenta ai   staminarfl.lua local rfl = 42 * 60 * 1000 local sto = 1010102 function onUse(cid, item, frompos, item2, topos) if not isPlayer(cid) then return true end

Postado

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 por Weslley Kiyo (veja o histórico de edições)

Postado
  • 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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo