Time HELP
#1

Hey guys. I tried many times to create a clock when i type /time to show me the current time.

I will be very glad if anyone try to help me. Anyways giving a +REP.
Reply
#2

Any help please?
Reply
#3

Do you already have an implemented clock ? If so, post the code here.
Reply
#4

I was using one but i removed it becouse other thing wasn't work ,so at the moment i don't have.
Reply
#5

pawn Код:
CMD:time(playerid,params[])
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
printf("%02d:%02d:%02d", Hour, Minute, Second);
GameTextForPlayer(playerid, string, 5000, 1);
}
return 1;
}
Reply
#6

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
pawn Код:
CMD:time(playerid,params[])
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
printf("%02d:%02d:%02d", Hour, Minute, Second);
GameTextForPlayer(playerid, string/*not defined*/, 5000, 1);
}//this 1
return 1;
}
this wont work you forgot to define the string and u added useless brackt :P
try this!
pawn Код:
CMD:time(playerid,params[])
{
new Hour, Minute, Second, string[50];
gettime(Hour, Minute, Second);
printf("%02d:%02d:%02d", Hour, Minute, Second);
GameTextForPlayer(playerid, string, 5000, 1);
return 1;
}
Reply
#7

The textdraw won't shows up. I don't know where is the problem.
Reply
#8

Quote:
Originally Posted by necrobg3
Посмотреть сообщение
The textdraw won't shows up. I don't know where is the problem.
pawn Код:
CMD:time(playerid,params[])
{
new Hour, Minute, Second, string[32];
gettime(Hour, Minute, Second);
format(string, sizeof(string), "%02d:%02d:%02d", Hour, Minute, Second);
GameTextForPlayer(playerid, string, 5000, 1);
return 1;
}
Have fun
Reply
#9

Thanks! +REP for you.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)