kthx, this is my new code:
function thirstTick()
{
//Do stuff
needs();
//Reiterate
schedule(1000, 0, thirstTick);
}
function needs()
{
while(%i < clientGroup.getCount())
{
%client = clientgroup.getobject(%i);
if(%client.thirst == 0)
{
%client.player.kill();
}
else
{
%client.thirst--;
}
commandToClient(%client, 'bottomPrint', "\c3Thirst: \c6" @ %client.thirst, 1);
%i++;
}
}
registerOutputEvent(GameConnection,AddNeeds,"list 25 0 50 1 75 2 100 3");
function GameConnection::AddNeeds(%client, %amnt)
{
%client.thirst += (%amnt + 1)*25;
if(%client.thirst > 100)
{
%client.thirst = 100;
}
}
package thirst
{
function GameConnection::spawnPlayer(%client)
{
%client.thirst = 100;
Parent::spawnPlayer(%client);
}
};
activatePackage(thirst);