//==========================[Clock]=======================================
new hour, minute;
new timestr[32];
//=========================[World Time]=========================================
new timeshift = -1;
new shifthour;
new ghour = 0;
new gminute = 0;
new gsecond = 0;
new realtime = 1;
new wtime = 15;
//==============================================================================
public UpdateTime()
{
gettime(hour, minute);
format(timestr,32,"%02d:%02d",hour,minute);
SetWorldTime(hour);
new x=0;
while(x!=MAX_PLAYERS) {
if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
SetPlayerTime(x,hour,minute);
}
x++;
}
}
UpdateTime();
SetTimer("UpdateTime",1000 * 60,1);
gettime(ghour, gminute, gsecond);
FixHour(ghour);
ghour = shifthour;
if(!realtime)
{
SetWorldTime(wtime);
}
AllowInteriorWeapons(1);
EnableStuntBonusForAll(0);
SetNameTagDrawDistance(60.0);
CalculateStarted = 1;
CalculateEvent = 1;
Jackpot = 50000;
EventPlayers = 0;
if (realtime)
{
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
SetWorldTime(tmphour);
}
gettime(hour, minute);
SetPlayerTime(playerid,hour,minute);
|
if (realtime) { new tmphour; new tmpminute; new tmpsecond; gettime(tmphour, tmpminute, tmpsecond); FixHour(tmphour); tmphour = shifthour; SetWorldTime(tmphour); } gettime(hour, minute); SetPlayerTime(playerid,hour,minute); |