Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #pragma semicolon 1
- #pragma newdecls required
- public Plugin myinfo =
- {
- name = "Time on every X s",
- description = "",
- author = "Ch W.",
- version = "1.0",
- url = ""
- };
- public void OnMapStart()
- {
- //Pierwszy aby na początku mapy pokazać
- CreateTimer(20.0, TimerPrint, _, TIMER_FLAG_NO_MAPCHANGE);
- //Powtarzalny co 300s (5min)
- CreateTimer(300.0, TimerPrint, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
- }
- public Action TimerPrint(Handle timer)
- {
- char FormatedTime[100];
- FormatTime(FormatedTime, sizeof(FormatedTime), "%X", GetTime());
- for(int i = 1; i < MaxClients; i++)
- {
- if(IsClientSourceTV(i))
- PrintToChat(i, " Aktualny czas: %s", FormatedTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement