diff --git a/reapi/extra/amxmodx/scripting/include/reapi_engine.inc b/reapi/extra/amxmodx/scripting/include/reapi_engine.inc index e0583e08..b2487747 100644 --- a/reapi/extra/amxmodx/scripting/include/reapi_engine.inc +++ b/reapi/extra/amxmodx/scripting/include/reapi_engine.inc @@ -293,7 +293,7 @@ native bool:rh_is_paused(); * * @noreturn */ -native rh_set_paused(const bool:st); +native rh_set_paused(const bool:st, const bool:host); /* * Checks if a specific entity is fully packed in a given frame for a host client. diff --git a/reapi/include/cssdk/engine/rehlds_api.h b/reapi/include/cssdk/engine/rehlds_api.h index 0444b60c..588acb3a 100644 --- a/reapi/include/cssdk/engine/rehlds_api.h +++ b/reapi/include/cssdk/engine/rehlds_api.h @@ -382,6 +382,7 @@ struct RehldsFuncs_t { void(*RemoveExtDll)(void *hModule); void(*RemoveCvarListener)(const char *var_name, cvar_callback_t func); ENTITYINIT(*GetEntityInit)(char *pszClassName); + void(*Host_Pause)(bool setPause); // Read functions int(*MSG_ReadChar)(); diff --git a/reapi/src/natives/natives_misc.cpp b/reapi/src/natives/natives_misc.cpp index d34876a7..ab03fe53 100644 --- a/reapi/src/natives/natives_misc.cpp +++ b/reapi/src/natives/natives_misc.cpp @@ -3743,11 +3743,16 @@ cell AMX_NATIVE_CALL rh_is_paused(AMX *amx, cell *params) * * native rh_set_paused(const bool:st); */ -cell AMX_NATIVE_CALL rh_set_paused(AMX *amx, cell *params) +cell AMX_NATIVE_CALL rh_set_pause(AMX *amx, cell *params) { - enum { arg_count, arg_st }; - g_RehldsData->SetPaused(params[arg_st] != 0); + enum { arg_count, arg_st, arg_host }; + bool isPause = params[arg_st] != 0; + g_RehldsData->SetPaused(isPause); + if (params[arg_host] != 0) + { + g_RehldsFuncs->Host_Pause(isPause); + } return TRUE; } @@ -3764,7 +3769,7 @@ AMX_NATIVE_INFO Misc_Natives_RH[] = { "rh_is_entity_fullpacked", rh_is_entity_fullpacked }, { "rh_get_client_connect_time", rh_get_client_connect_time }, { "rh_is_paused", rh_is_paused }, - { "rh_set_paused", rh_set_paused }, + { "rh_set_paused", rh_set_pause }, { nullptr, nullptr } };