SA-MP Forums Archive
Time HELP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Time HELP (/showthread.php?tid=380984)



Time HELP - necrobg3 - 27.09.2012

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.


Re: Time HELP - necrobg3 - 28.09.2012

Any help please?


Re: Time HELP - Cameltoe - 28.09.2012

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


Re: Time HELP - necrobg3 - 28.09.2012

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


Re: Time HELP - XtremeR - 28.09.2012

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;
}



Re: Time HELP - xMCx - 28.09.2012

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;
}



Re: Time HELP - necrobg3 - 28.09.2012

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


Re: Time HELP - KingHual - 28.09.2012

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


Re: Time HELP - necrobg3 - 28.09.2012

Thanks! +REP for you.