Small help needed.
#1

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 )
Reply
#2

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

Not sure why you'd want that though..?
Reply
#3

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); 
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)