diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 814285bc..02a2fde8 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -4054,7 +4054,14 @@ static cell AMX_NATIVE_CALL LibraryExists(AMX *amx, cell *params) static cell AMX_NATIVE_CALL set_fail_state(AMX *amx, cell *params) { int len; - char *str = get_amxstring(amx, params[1], 0, len); + char* str; + + g_langMngr.SetDefLang(LANG_SERVER); // Default language = server + + if (params[0] / sizeof(cell) > 1) + str = format_amxstring(amx, params, 1, len); + else + str = get_amxstring(amx, params[1], 0, len); CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(amx); diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index fb7cdfa9..0a08f5dc 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -968,7 +968,7 @@ native int3(); //If you use this, your plugin will cease operating. //This is a good idea to fatally, but gracefully, handle errors. //You can set a failed error message. -native set_fail_state(const err_msg[]); +native set_fail_state(const fmt[], any:...); //Returns the reference address of the variable passed in. //This address is local to the plugin, and not a full CPU address