Server /time?
#1

Hello,

I have taken a look at gettime(); on samp wiki and i have search through existing gamemodes (GF) but i cannot understand the way that servers have a /time..

This is for my RP script and this is the ONE thing i have had trouble with (also with past RP scripts i made).

So, does anyone have any good links that can help me with this? or any good info that will help?

-Thanks for help
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=99339
https://sampforum.blast.hk/showthread.php?tid=99374
- was related x)
Reply
#3

So, i just need to change that a bit then i can make it Hour, minutes, seconds...

but that would mean doing the timer every second?
Reply
#4

bump

I need help with this still
Reply
#5

I don't know how to show it for a certain time, but I know how to create the clock on your screen (high on the right)
pawn Код:
new Clock[MAX_PLAYERS];

forward UpdateClock(playerid);
public UpdateClock(playerid)
{
    gettime(Shour, Sminute, Ssecond);
    new string[56];
    if(Sminute < 10) {
        if(Shour <10) {
            if(Ssecond <10) {
                format(string,sizeof(string),"%s~n~0%d:0%d:0%d",string2,Shour,Sminute, Ssecond);
            } else {
                format(string,sizeof(string),"%s~n~0%d:0%d:%d",string2,Shour,Sminute, Ssecond);
            }
        } else {
            if(Ssecond <10) {
                format(string,sizeof(string),"%s~n~%d:0%d:0%d",string2,Shour,Sminute, Ssecond);
            } else {
                format(string,sizeof(string),"%s~n~%d:0%d:%d",string2,Shour,Sminute, Ssecond);
            }
        }
    } else {
        if(Shour < 10) {
            if(Ssecond <10) {
                format(string,sizeof(string),"%s~n~0%d:%d:0%d",string2,Shour,Sminute,Ssecond);
            } else {
                format(string,sizeof(string),"%s~n~0%d:%d:%d",string2,Shour,Sminute,Ssecond);
            }
        } else {
            if(Ssecond <10) {
                format(string,sizeof(string),"%s~n~%d:%d:0%d",string2,Shour,Sminute, Ssecond);
            } else {
                format(string,sizeof(string),"%s~n~%d:%d:%d",string2,Shour,Sminute, Ssecond);
            }
        }
    }
    Clock[playerid] = TextDrawCreate(543.0, 22.0, string);
    TextDrawSetShadow(Clock[playerid], 0);
    TextDrawSetOutline(Clock[playerid], 2);
    TextDrawLetterSize(Clock[playerid], 0.6, 1.8);
    TextDrawFont(Clock[playerid], 3);
    TextDrawShowForPlayer(playerid, Clock[playerid]);
}
Reply
#6

YEah i could do that, but i want my own time... i just think updating some variables every second would be stupid...
Reply
#7

Check out my FS, thats what you need

Click me!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)