Hello.
I try wrote a code that allows me to set the next map by console command.
What i did wrong ?
PHP Code:
#include <amxmodx>
#include <amxmisc>
new const NAME[] = "Nextmap"
new const VERSION[] = "1.0"
new const AUTHOR[] = "Bogdan"
public plugin_init()
{
register_plugin(NAME, VERSION, AUTHOR)
register_concmd("amx_nextmap","nextmap_code",ADMIN_BAN,"Set nextmap")
}
public nextmap_code(id,level,cid)
{
if(!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED
}
new insert, name[32]
get_user_name(id, name, 31)
set_cvar_num("amx_nextmap", insert)
client_print(0,print_chat,"[AMXX] Admin %s : Set next map to %s", name, insert)
return PLUGIN_HANDLED
}