mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Add ability to text formatting to set_fail_state (bug 5800, r=me)
This commit is contained in:
parent
d96a6389b8
commit
2af8a27164
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user