SA-MP/bot/scrtimers.h

36 lines
643 B
C
Raw Normal View History

2023-10-31 21:31:16 +08:00
2024-01-30 21:52:00 +08:00
#ifndef SAMPNPC_TIMERS_H
#define SAMPNPC_TIMERS_H
struct ScriptTimer_s
{
char szScriptFunc[255];
int iTotalTime;
int iRemainingTime;
BOOL bRepeating;
BOOL bKilled;
AMX* pAMX;
int iParamCount;
void* cellParams;
2024-01-30 21:52:00 +08:00
};
typedef std::map<DWORD, ScriptTimer_s*> DwordTimerMap;
//----------------------------------------------------------------------------------
class CScriptTimers
2023-10-31 21:31:16 +08:00
{
private:
2024-01-30 21:52:00 +08:00
DwordTimerMap m_Timers;
DWORD m_dwTimerCount;
2023-10-31 21:31:16 +08:00
public:
CScriptTimers();
~CScriptTimers();
2024-01-30 21:52:00 +08:00
DWORD New(char* szScriptFunc, int iInterval, BOOL bRepeating, AMX* pAMX);
void Kill(DWORD dwTimerId);
void FreeMem(ScriptTimer_s* Timer);
2024-01-30 21:52:00 +08:00
};
#endif