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?
So, i just need to change that a bit then i can make it Hour, minutes, seconds...
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]);
}
YEah i could do that, but i want my own time... i just think updating some variables every second would be stupid...