Live Time.
#1

Hey, I've scripted a time system for my server but one problem is, I don't really know how to make it live time. Here's some of my code.

Here's my OnGamemodeInit, were it sets the time, but it's not live, how would I make it live?

Код:
Hour = 12;
Minute = 30;
Second = 1;
ClockTimer = SetTimer("ClockUpdate", 999, 1);
If you need anymore code let me know.
Reply
#2

why you dont use Gettime
https://sampwiki.blast.hk/wiki/Gettime
Код:
forward ClockUpdate();
public ClockUpdate()
{
    new Hour, Minute, Second;
    gettime(Hour, Minute, Second);
     printf("%02d:%02d:%02d", Hour, Minute, Second);
}
Reply
#3

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
why you dont use Gettime
https://sampwiki.blast.hk/wiki/Gettime
Код:
forward ClockUpdate();
public ClockUpdate()
{
    new Hour, Minute, Second;
    gettime(Hour, Minute, Second);
     printf("%02d:%02d:%02d", Hour, Minute, Second);
}
Ahh, there we are I didn't even know about that lol. Thanks bud.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)