Quote:
Originally Posted by jonesy
ok i added a very simple weather change system to it
updated first post
|
try changing ur callback to:
public settime(){
new hour,minute,second;
new string[256];
gettime(hour,minute,second);
if (minute <= 9){format(string,25,"%d:0%d",hour,minute);}
else {format(string,25,"%d:%d",hour,minute);}
TextDrawSetString(Clock,string);
SetWorldTime(hour);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
SetPlayerTime(i,hour,00);
}
}
new day, month, year;
new weekday;
getdate(day, month, year);
weekday = GetWeekdayNum(day, month, year);
if(weekday == 1){TextDrawSetString(WeekDayg,"Monday");}
if(weekday == 2){TextDrawSetString(WeekDayg,"Tuesday");}
if(weekday == 3){TextDrawSetString(WeekDayg,"Wednesday");}
if(weekday == 4){TextDrawSetString(WeekDayg,"Thursday");}
if(weekday == 5){TextDrawSetString(WeekDayg,"Friday");}
if(weekday == 6){TextDrawSetString(WeekDayg,"Saturday");}
if(weekday == 7){TextDrawSetString(WeekDayg,"Sunday");}
return 1;
}