Teddy
SweStream.se
Works for 0.4 ?
All is perfect. But i test it and get an error.... When you use the Stamina Refiller in PZ ZONE, it RemoveItem but dont give stamina.. What's happened there?
I rate this necro 11/10. If anyone wishes, I could convert this script to tfs 0.3.6/tfs 1.x+Does not work for TFS 0.4 keeps removing item when full stamina.
0.4 has the same functionality as 0.3.6, if someone offers to convert it then you should take them up on it.Bump need it for 0.4 TFS so it doesnt use when full stamina!
Some guy gave me this, im guessing it only uses item if under 40 hours stamina?0.4 has the same functionality as 0.3.6, if someone offers to convert it then you should take them up on it.
local maxStamina = 42 * 60 * 1000
local happyHour = getConfigValue("staminaRatingLimitTop")
function onUse(cid, item, fromPosition, itemEx, toPosition)
local staminaTime = getPlayerStamina(cid) - getConfigValue("staminaRatingLimitTop")
if(getPlayerStamina(cid) >= happyHour) then
doPlayerSendCancel(cid, "You still have ".. staminaTime .." minutes worth of happyHour.")
return true
end
if(not isPremium(cid)) then
doPlayerSendCancel(cid, "You must have a premium account.")
return true
end
if doRemoveItem(item.uid) == TRUE then
doPlayerSetStamina(cid, maxStamina)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
end
return true
end
That is kind of rude to not mention the name of the person(s) who wrote you the script...Some guy gave me this, im guessing it only uses item if under 40 hours stamina?
Why would i need to do that when its in my other thread? The credit is there.