Ir para conteúdo

Featured Replies

Postado

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?

Resolvido por Rusherzin

Ir para solução
  • Respostas 11
  • Visualizações 894
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    ELE FEZ O ITEM SER REMOVIDO E ADD NOVAMENTE, SERIA BASICAMENTE INFINITO.

  • Mas eu botei a função pra remover e depois adicionar o item function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(

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

z_WL63_Tt.png

Postado

@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 

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.6k

Informação Importante

Confirmação de Termo