SA-MP Forums Archive
Small help needed. - 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: Small help needed. (/showthread.php?tid=344973)



Small help needed. - Kukkurloom - 23.05.2012

PHP код:
new string[128];
new 
playername[MAX_PLAYER_NAME];
GetPlayerName(playeridplayernamesizeof(playername));
format(string,sizeof(string),"%s Has left the server."playername); 
How can I add real time after the Message like : Jason has left the server. ( 15:37 )


Re: Small help needed. - MP2 - 23.05.2012

https://sampwiki.blast.hk/wiki/gettime

Not sure why you'd want that though..?


Re: Small help needed. - Kukkurloom - 23.05.2012

I'm going to add this to my RolePlay server. Better to ban hackers when they log out before antiban starts to smash

I added :
PHP код:
new HourMinuteSecond;
gettime(HourMinuteSecond);
printf("%02d:%02d:%02d"HourMinuteSecond); 
When player connects, but how I can do now.
PHP код:
new string[128];
new 
playername[MAX_PLAYER_NAME];
GetPlayerName(playeridplayernamesizeof(playername));
format(string,sizeof(string),"%s has left the server."playername); // Time here. 
PHP код:
format(string,sizeof(string),"%s has left the server. (HOUR:MIN)"playername); 



Re: Small help needed. - miokie - 23.05.2012

pawn Код:
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string,sizeof(string),"%s has left the server. (%d:%d)", playername,Hour,Minute); // Time here.