--[[
function setHunger()
for i,player in ipairs(getElementsByType("player")) do
if getElementData(player,"logedin") then
value = gameplayVariables["loseHunger"]
addPlayerStats (player,"food",value)
end
end
end
setTimer(setHunger,60000,0)
function setThirsty()
for i,player in ipairs(getElementsByType("player")) do
if getElementData(player,"logedin") then
value = gameplayVariables["loseThirst"]
addPlayerStats (player,"thirst",value)
end
end
end
setTimer(setThirsty,60000,0)
function checkThirsty()
for i,player in ipairs(getElementsByType("player")) do
if getElementData(player,"logedin") then
value = 0
if getControlState (player,"sprint") then
value = gameplayVariables["sprintthirst"]
end
addPlayerStats (player,"thirst",value)
end
end
end
setTimer(checkThirsty,10000,0)
]]
|