Could anyone tell me why this message spams the chat when the time goes to 11:30
"BUSINESS: You havent played long enough to recieve interest on your business");"
Код:
{
new string[128];
format(string, 128, "Game Time: %02d:00", hour);
SendClientMessageToAll(COLOR_GREEN, string);
for(new i=0; i < MAX_BIZZ; i++)
{
if(IsNameConnected(BizzInfo[i][owner]))
{
new id=NametoID(BizzInfo[i][owner]);
if(PlayerInfo[id][logminute] >= 600)
{
format(string, 128, "BUSINESS: You have been on for atleast 10 minutes so you recieve interest from your business");
SendClientMessage(id, COLOR_GREEN, string);
new Float:interest=BizzInfo[i][vault]*0.8;
format(string, 126, "Your business has $%d left in its vault so you recieve $%d of interest.", BizzInfo[i][vault], floatround(interest));
SendClientMessage(id, COLOR_GREEN, string);
GivePlayerMoneyEx(id, floatround(interest));
}
else
{
SendClientMessage(id, COLOR_GREEN, "BUSINESS: You havnt played long enough to recieve interest on your business");
}
}
if(BizzInfo[i][vault] < 20000)
{
format(string, 128, "%d", i);
new string2[64];
BizzInfo[i][vault]+=20000;
format(string2, 64, "%s,%d",BizzInfo[i][owner],BizzInfo[i][vault]);
dini_Set("/bizz/business.cfg", string, string2);
}
}
for(new a=0; a < MAX_ATM; a++)
{
if(ATMInfo[a][inside] < 10000)
{
format(string, 128, "%d", a);
ATMInfo[a][inside]+=10000;
dini_IntSet("/bizz/atm.cfg", string, ATMInfo[a][inside]);
}
}
foreach(Player, i)
{
if(PlayerInfo[i][logminute] >= 600)
{
if(IsPlayerCop(i))
{
format(string, 256, "PAYCHECK: You have been on for atleast 10 minutes so you recieve a paycheck for being an officer");
SendClientMessage(i, COLOR_GREEN, string);
GameTextForPlayer(i, "~b~Paycheck~n~~r~+$10000", 3000, 3);
GivePlayerMoneyEx(i, 10000);
}
else
{
format(string, 256, "PAYCHECK: You have been on for atleast 10 minutes so you recieve a paycheck for being a civilian");
SendClientMessage(i, COLOR_GREEN, string);
GameTextForPlayer(i, "~b~Paycheck~n~~r~+$5000", 3000, 3);
GivePlayerMoneyEx(i, 5000);
}
PlayerInfo[i][Hours]++;
}
else
{
SendClientMessage(i, COLOR_RED, "PAYCHECK: You dont recieve a paycheck because you havent been online for atleast 10 minutes");
}
}
}
}
But it doesn't spam when I add this at the top of the new string, but it does restart the clock over and over. [This is what I deleted to stop the restarting of the clock]