06.08.2017, 11:10
PHP код:
public Timer()
{
new timestring[256];
new daystring[256];
new gseconds = GM[gtime] % 60,
gminutes = (GM[gtime] - gseconds) / 60;
GM[gtime] ++;
format(timestring, sizeof (timestring), "%02d:%02d", gminutes, gseconds);
TextDrawSetString(GM[gtTD][1],timestring);
TextDrawShowForAll(GM[gtTD][1]);
format(daystring, sizeof (daystring), "%s",GetDayName());
TextDrawSetString(GM[gtTD][0],daystring);
TextDrawShowForAll(GM[gtTD][0]);
if(GM[gday]==6 && GM[gtime]==1440)
{
GM[gday] = 0;
GM[gtime] = 0;
}
if(GM[gtime]==120) //2 mins
{
moneybag = 0 ;
}
if(GM[gtime]==240)//4 mins
{
new string[256];
format(string, sizeof(string), "* Today's jackpot has reached to $%s. Draw will be held at 06:00 ! Use /lotto to purchase a ticket.",FormatNumber(LottoJackpot));
SendClientMessageToAll(COLOR_LOTTO,string);
SendClientMessageToAll(COLOR_RED,"{66ff33}[Money Bag] A Money Bag has been reported lost Somewhere in Los Santos. Find it you will be rewarded.");
}
if(GM[gtime]==360)//6 mins
{
LottoDraw();
SendClientMessageToAll(COLOR_LOTTO,"* Next Lotto Draw will be at 18:00. Type /lotto to purachase a Ticket.");
}
if(GM[gtime]==480)//8 mins
{
ChangeStage(); //money bag system
}
if(GM[gtime]==720)//12 mins
{
ChangeStage(); //money bag system
}
if(GM[gtime]==960)//16 mins
{
ChangeStage(); //money bag system
new string[256];
format(string, sizeof(string), "* Today's jackpot has reached to $%s. Draw will be held at 18:00 ! Use /lotto to purchase a ticket.",FormatNumber(LottoJackpot));
SendClientMessageToAll(COLOR_LOTTO,string);
}
if(GM[gtime]==1080)//18 mins
{
LottoDraw();
SendClientMessageToAll(COLOR_LOTTO,"* Tomorrow's Lotto Draw will be at 06:00. Type /lotto to purachase a Ticket.");
}
if(GM[gtime]==1200)//20 mins
{
ChangeStage(); //money bag system
}
if(GM[gtime]==1440)//24 mins
{
ChangeStage();// money bag system.
GM[gday]++;
GM[gtime]=0;
format(daystring, sizeof (daystring), "00:00");
for(new b = 0; b < MAX_GANGS; b++)
{
if(Gang[b][gangStatus])
{
saveGang(b);
}
}
foreach(new m : Player)
{
taxplayer(m);
}
TextDrawSetString(GM[gtTD][1],daystring);
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerTime( i, gminutes, gseconds);
}
}
return 1;
}
Any Fix for it ?