Cheers,
I have a Cooldown and Interest Timer in my Server.
Its Timer Works well but when function executes and when there are more than 10 players in server.
It starts spamming..
Here is the codes:
and here is the interest timer code:
Thnx..
I have a Cooldown and Interest Timer in my Server.
Its Timer Works well but when function executes and when there are more than 10 players in server.
It starts spamming..
Here is the codes:
PHP Code:
public CooldownTimer(playerid)
{
new msg[120];
if(Player[playerid][playerWanted] > 0 )
{
Player[playerid][playerWanted]--;
format(msg,sizeof(msg),"Your wanted level has been reduced to %d.",Player[playerid][playerWanted]);
SendClientMessage(playerid,COLOR_YELLOW,msg);
setWanted(playerid,Player[playerid][playerWanted]);
return 1;
}
else
{
TextDrawHideForPlayer(playerid, GM[loadObjectTD][0]);
}
return 1;
}
PHP Code:
public InterestTimer(playerid)
{
new giveintr,deduction,msg3[100];
Player[playerid][interestTimer]++;
//SendClientMessage(playerid,COLOR_YELLOW,"DEBUG: ID 1");
if(Player[playerid][interestTimer] >= 10)
{
deduction = 10000;
giveintr = Player[playerid][moneyBank]/deduction;
Player[playerid][interest] = Player[playerid][interest] + giveintr;
format(msg3,sizeof(msg3),"You have recieved your interest payment of $%s. Head to nearest local bank to collect it.",FormatNumber(giveintr));
SendClientMessage(playerid,COLOR_YELLOW,msg3);
Player[playerid][interestTimer] = 0;
return 1;
}
return 1;
}