Advertisement
Guest User

Untitled

a guest
Oct 6th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.71 KB | None | 0 0
  1. #include <sourcemod>
  2.  
  3. #pragma semicolon 1
  4. #pragma newdecls required
  5.  
  6. public Plugin myinfo =
  7. {
  8.     name = "Time on every X s",
  9.     description = "",
  10.     author = "Ch W.",
  11.     version = "1.0",
  12.     url = ""
  13. };
  14.  
  15. public void OnMapStart()
  16. {
  17.     //Pierwszy aby na początku mapy pokazać
  18.     CreateTimer(20.0, TimerPrint, _, TIMER_FLAG_NO_MAPCHANGE);
  19.     //Powtarzalny co 300s (5min)
  20.     CreateTimer(300.0, TimerPrint, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
  21. }
  22.  
  23. public Action TimerPrint(Handle timer)
  24. {
  25.     char FormatedTime[100];
  26.     FormatTime(FormatedTime, sizeof(FormatedTime), "%X", GetTime());
  27.  
  28.     for(int i = 1; i < MaxClients; i++)
  29.     {
  30.         if(IsClientSourceTV(i))
  31.             PrintToChat(i, " Aktualny czas: %s", FormatedTime);
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement