2024-01-19 23:19:26 +08:00
|
|
|
|
|
|
|
#ifndef SAMPNPC_GAMEMODES_H
|
|
|
|
#define SAMPNPC_GAMEMODES_H
|
|
|
|
|
2024-01-30 21:58:10 +08:00
|
|
|
extern char szGameModeFileName[256];
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class CGameMode
|
2024-01-19 23:19:26 +08:00
|
|
|
{
|
|
|
|
private:
|
2024-01-30 21:58:10 +08:00
|
|
|
AMX m_amx;
|
|
|
|
bool m_bInitialised;
|
|
|
|
bool m_bSleeping;
|
|
|
|
float m_fSleepTime;
|
2024-01-19 23:19:26 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
CGameMode();
|
2024-01-30 21:58:10 +08:00
|
|
|
~CGameMode();
|
|
|
|
|
|
|
|
char* GetFileName() { return &szGameModeFileName[0]; };
|
|
|
|
|
2024-02-21 19:44:43 +08:00
|
|
|
bool Load(char* pFileName);
|
2024-01-30 21:58:10 +08:00
|
|
|
void Unload();
|
2024-01-30 22:02:40 +08:00
|
|
|
void Frame(float fElapsedTime);
|
|
|
|
|
2024-01-30 22:04:49 +08:00
|
|
|
int CallPublic(char* szFuncName);
|
|
|
|
|
|
|
|
int OnNPCConnect(cell myplayerid);
|
|
|
|
int OnNPCDisconnect(char *szReason);
|
|
|
|
int OnNPCSpawn();
|
|
|
|
int OnNPCEnterVehicle(cell vehicleid, cell seatid);
|
|
|
|
int OnNPCExitVehicle();
|
2024-06-01 19:50:36 +08:00
|
|
|
int OnClientMessage(cell color, unsigned char * szText);
|
2024-01-30 22:04:49 +08:00
|
|
|
int OnPlayerDeath(cell playerid);
|
|
|
|
int OnPlayerText(cell playerid, unsigned char * szText);
|
|
|
|
int OnPlayerStreamIn(cell playerid);
|
|
|
|
int OnPlayerStreamOut(cell playerid);
|
|
|
|
int OnVehicleStreamIn(cell vehicleid);
|
|
|
|
int OnVehicleStreamOut(cell vehicleid);
|
|
|
|
int OnRecordingPlaybackEnd();
|
2024-01-19 23:19:26 +08:00
|
|
|
};
|
|
|
|
|
2024-01-30 21:58:10 +08:00
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
|
2024-01-19 23:19:26 +08:00
|
|
|
#endif
|