02.06.2016, 13:41
Players seem to get spammed with 'you did not qualify for a paycheck' if they haven't.. It runs on the hour every hour but it repeats itself, how do I combat this? I want it to break after it has reached all online players.
pawn Код:
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);
}
}
}
}
}
}