#1

i got a real life time

and i dont mean the time in game is the time is where the server is being hosted at

i want that each time the server restart it sets the time to 6 am and each 30 seconds IG is 1 min IRL

so i did it

but i cant fix the clock, it gets my real life time and shows it in the textdraw instead game time

so how to fix

heres the FS:

public UpdateTime()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Hour, Min;
gettime(Hour,Min);
new string[16];
format(string, sizeof(string), "%02d:%02d", Hour, Min);
SetPlayerTime(i, Hour, Min);
TextDrawSetString(Clock[i], string);
}
return 1;
}
Reply
#2

gettime gets the SERVER time not the GAME time. What you can do is sync them bot

public UpdateTime()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Hour, Min;
gettime(Hour,Min);
SetWorldTime(Hour);
new string[16];
format(string, sizeof(string), "%02d:%02d", Hour, Min);
SetPlayerTime(i, Hour, Min);
TextDrawSetString(Clock[i], string);
}
return 1;
}

so time will be same as ServerTime
Reply
#3

Thank you for your cooperation, sir.

but still it didnt work

clock still says real life time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)