SA-MP/bot/gamemodes.h
RD42 c0945ce5c5 [bot] Update gamemodes.cpp/.h
* Update `CGameMode::Load(...)`
* Update `CGameMode::Unload()`
2024-07-03 23:27:12 +08:00

47 lines
1.1 KiB
C++

#ifndef SAMPNPC_GAMEMODES_H
#define SAMPNPC_GAMEMODES_H
extern char szGameModeFileName[256];
//----------------------------------------------------------------------------------
class CGameMode
{
private:
AMX m_amx;
bool m_bInitialised;
bool m_bSleeping;
float m_fSleepTime;
public:
CGameMode();
~CGameMode();
char* GetFileName() { return &szGameModeFileName[0]; };
bool Load(char* pFileName);
void Unload();
void Frame(float fElapsedTime);
int CallPublic(char* szFuncName);
int OnNPCConnect(cell myplayerid);
int OnNPCDisconnect(char *szReason);
int OnNPCSpawn();
int OnNPCEnterVehicle(cell vehicleid, cell seatid);
int OnNPCExitVehicle();
int OnClientMessage(cell color, unsigned char * szText);
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();
};
//----------------------------------------------------------------------------------
#endif