mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 20:26:14 +08:00
[server] Implement and match n_GameModeExit(...)
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user