32 #ifndef _INCLUDE_SOURCEMOD_TIMER_SYSTEM_H_
33 #define _INCLUDE_SOURCEMOD_TIMER_SYSTEM_H_
44 #define SMINTERFACE_TIMERSYS_NAME "ITimerSys"
45 #define SMINTERFACE_TIMERSYS_VERSION 4
97 virtual ResultType
OnTimer(ITimer *pTimer,
void *pData) =0;
105 virtual void OnTimerEnd(ITimer *pTimer,
void *pData) =0;
108 #define TIMER_FLAG_REPEAT (1<<0)
109 #define TIMER_FLAG_NO_MAPCHANGE (1<<1)
111 class ITimerSystem : public SMInterface
116 return SMINTERFACE_TIMERSYS_NAME;
120 return SMINTERFACE_TIMERSYS_VERSION;
134 virtual ITimer *CreateTimer(
ITimedEvent *pCallbacks,
145 virtual void KillTimer(ITimer *pTimer) =0;
157 virtual void FireTimerOnce(ITimer *pTimer,
bool delayExec=
false) =0;
172 virtual void MapTimeLeftChanged() =0;
187 virtual float GetTickedTime() =0;
195 virtual void NotifyOfGameStart(
float offset = 0.0f) =0;
205 virtual bool GetMapTimeLeft(
float *pTime) =0;
216 #endif //_INCLUDE_SOURCEMOD_TIMER_SYSTEM_H_
unsigned int GetInterfaceVersion()
Must return an integer defining the interface's version.
Definition: ITimerSystem.h:118
virtual void ExtendMapTimeLimit(int extra_time)=0
const char * GetInterfaceName()
Must return a string defining the interface's unique name.
Definition: ITimerSystem.h:114
Defines the interface for managing collections ("forwards") of plugin calls.
Defines the Share System, responsible for shared resources and dependencies.
virtual void OnTimerEnd(ITimer *pTimer, void *pData)=0
Called when the timer has been killed.
virtual void SetMapTimerStatus(bool enabled)=0
virtual ResultType OnTimer(ITimer *pTimer, void *pData)=0
Called when a timer is executed.
virtual int GetMapTimeLimit()=0
Definition: IAdminSystem.h:63
Interface for map timers.
Definition: ITimerSystem.h:54
Event callbacks for when a timer is executed.
Definition: ITimerSystem.h:87