[server] Implement and match n_GameModeExit(...)

This commit is contained in:
RD42
2024-04-28 22:33:31 +08:00
parent ea1a2cb2b3
commit c249a1d0ac

View File

@ -5,6 +5,8 @@
int set_amxstring(AMX *amx,cell amx_addr,const char *source,int max); int set_amxstring(AMX *amx,cell amx_addr,const char *source,int max);
extern BOOL bGameModeFinished;
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// native gpci(playerid, const clientid[], len) // native gpci(playerid, const clientid[], len)
@ -272,9 +274,16 @@ static cell AMX_NATIVE_CALL n_GetSVarsUpperIndex(AMX *amx, cell *params)
return 0; return 0;
} }
// native GameModeExit()
static cell AMX_NATIVE_CALL n_GameModeExit(AMX *amx, cell *params) static cell AMX_NATIVE_CALL n_GameModeExit(AMX *amx, cell *params)
{ {
// TODO: GameModeExit if(pNetGame->SetNextScriptFile(NULL)) {
bGameModeFinished = TRUE;
} else {
logprintf("The gamemode finished and I couldn't start another script.");
fcloseall();
exit(1);
}
return 0; return 0;
} }