Lbtg
Advanced OT User
- Joined
- Nov 22, 2008
- Messages
- 2,398
- Reaction score
- 165
hello i use 0.4 i got this script
i wanna make it refils 1 hoour stamina ,
now it moves your stamina to 1 hour lol
script
i wanna make it refils 1 hoour stamina ,
now it moves your stamina to 1 hour lol
script
PHP:
function onUse(cid, item, frompos, item2, topos)
local config = {
staminafull = 1*60, effect = 1 }
player = getPlayerPosition(cid)
playerstamina = getPlayerStamina(cid)
playeracc = getPlayerAccess(cid)
playerfood = getPlayerFood(cid)
if playeracc <= 2 then
if playerfood ~= 0 then
if playerstamina ~= config.staminafull then
setPlayerStamina(cid, config.staminafull)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,22,"Stamina added by a stamina pill!")
doSendMagicEffect(player, config.effect)
else
doPlayerSendTextMessage(cid,22,"You dont need a stamina pill!")
end
else
doPlayerSendTextMessage(cid,22,"You can't use it if hungry!")
end
else
doPlayerSendTextMessage(cid,22,"You are a member of the staff. You dont Need it!")
end
return true
end
Last edited: