hello, i receive stack error when i'm trying to set any value for rcon_password.
what i was doing wrong ?
Code:
#include <amxmisc>
#if AMXX_VERSION_NUM < 183
#assert AMX Mod X v1.8.3 or later library required!
#endif
public plugin_init()
{
register_plugin
(
.plugin_name = "Block changing rcon_password",
.version = "1.0",
.author = "lüxor"
);
hook_cvar_change(get_cvar_pointer("rcon_password"), "setDefaultValue");
}
public setDefaultValue(PointerCvar, const OldValue[], const NewValue[])
{
set_pcvar_string(PointerCvar, OldValue);
}
Console :
Code:
] restart
Server logging data to file logs\L1227013.log
L 12/27/2015 - 01:11:05: -------- Mapchange to de_dust2 --------
[AMXX] Loaded 1 admin from file
Executing AMX Mod X Configuration File
Scrolling message displaying frequency: 10:00 minutes
] rcon_password
"rcon_password" is "123"
] rcon_password meow
L 12/27/2015 - 01:12:02: [AMXX] Displaying debug trace (plugin "block_changing_rcon_pass.amxx", version "1.0")
L 12/27/2015 - 01:12:02: [AMXX] Run time error 3: stack error