LU
pedido

Staminia

Por ludgeromf1, 25 de jul. de 2012 em Scripts

geral
script
3
1.6k
ludgeromf1L
25 de julho de 2012 às 20:28

Bom gente eu tenho esse script aki no meu ot global na qual ele enche a staminia do player so q ele some eu queria saber se tem como fazer ele ficar infinito para que quando o player usar ñ sumir desde ja agradeço.

 

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

medmuM
25 de julho de 2012 às 20:43

Não Sou Muito Experiente ... Mais Tente :

function onUse(cid, item, fromPosition, itemEx, toPosition)

local cfg = {}

cfg.refuel = 9999999999 * 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

Editado Julho 25 por projetopoketibia

fredpaduaF
25 de julho de 2012 às 20:53

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

 

Tenta

 

@EDIT

 

Pelo que parece, o poject...

soh mudo a quantidade de stamina recuperada,

porem n passa do maximo ;x

Editado Julho 25 por FaltouCriatividade