02.06.2016, 13:50
EDIT: ah, you solved it.
Try this:
Try this:
PHP код:
if(TMins == 60)
{ //this resets the mins to 00 one it reaches 60
THrs ++;
TMins = 00;
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
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.");
}
if(LastPayday[i] >= 60)
{
doPayDay(i);
}
if(DrunkLevel[i] != 0)
{
DrunkLevel[i] -= 0.015;
if(DrunkLevel[i] < 0.08)
{
SetPlayerDrunkLevel(i, 0);
}
if(DrunkLevel[i] > 0.08 && DrunkLevel[i] < 0.2)
{
SetPlayerDrunkLevel(i, 0);
}
if(DrunkLevel[i] > 0.2 && DrunkLevel[i] < 0.5)
{
SetPlayerDrunkLevel(i, 20000);
}
if(DrunkLevel[i] > 0.5 && DrunkLevel[i] < 1.0)
{
SetPlayerDrunkLevel(i, 30000);
}
if(DrunkLevel[i] > 1.0)
{
SetPlayerDrunkLevel(i, 50000);
}
}
}
}
break;
}
}