• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[TFS 1.2] Refil three hours of stamina

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi folks!

What function can I use to refil three hours of stamina? I don't think player:getStamina() can handle it.


Thanks everyone.
 
How about player:setStamina(stamina)?
I'm not sure what unit stamina is measured in so use player:getStamina() to check if it's in seconds, minutes or something else.
 
It's in minutes, so:

player:setStamina(player:getStamina() + 180)

Dunno if it will set player's stamina to higher number than 42:00, but this should work. :)
 
Maybe we can try use something like this?

Code:
if player:getStamina() >= 2520 then
    -- error msg
else
    player:setStamina(player:getStamina() + 180)
end
 
Back
Top