02.06.2016, 16:31
Try this maybe :
PHP код:
if(TMins == 60)
{ //this resets the mins to 00 one it reaches 60
THrs ++;
TMins = 00;
foreach(new i : Player)
{
SetPlayerTime(i,THrs,TMins);
if(LoggedIn[i])
{
if(LastPayday[i] < 60)
{
SendClientMessage(i, COLOUR_PURPLE, "You did not qualify for a paycheck as you have not played for enough time.");
}
else if(LastPayday[i] >= 60)
{
doPayDay(i);
}
if(DrunkLevel[i] != 0)
{
DrunkLevel[i] -= 0.015;
if(DrunkLevel[i] < 0.08)
{
SetPlayerDrunkLevel(i, 0);
}
else if(DrunkLevel[i] >= 0.08 && DrunkLevel[i] < 0.2)
{
SetPlayerDrunkLevel(i, 0);
}
else if(DrunkLevel[i] >= 0.2 && DrunkLevel[i] < 0.5)
{
SetPlayerDrunkLevel(i, 20000);
}
else if(DrunkLevel[i] >= 0.5 && DrunkLevel[i] < 1.0)
{
SetPlayerDrunkLevel(i, 30000);
}
else if(DrunkLevel[i] >= 1.0)
{
SetPlayerDrunkLevel(i, 50000);
}
}
return 1;
}
else break;
}
}