mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
c0945ce5c5
* Update `CGameMode::Load(...)` * Update `CGameMode::Unload()`
47 lines
1.1 KiB
C++
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
|