Bugzilla – Bug 3068
New command : amx_extendmap <number of minutes>
Last modified: 2014-02-08 23:51:59 PST
It's a request from some people. That's a feature from Amx2006.3. It allows you to extend the current map. Some lines to add in '//admincmd.sma//' : <code>new p_timelimit public plugin_init() { // [...] register_concmd( "amx_extendmap", "cmdExtendMap", ADMIN_MAP, "<number of minutes> - extends map" ) // [...] p_timelimit = get_cvar_pointer( "p_timelimit" ) } // [...] public cmdExtendMap(id, level, cid) { if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED new arg[32] read_argv(1, arg, 31) new mns = str_to_num(arg) if(mns <= 0) return PLUGIN_HANDLED new mapname[32] get_mapname(mapname, 31) set_pcvar_num( p_timelimit , get_pcvar_num( p_timelimit ) + mns) new authid[32], name[32] get_user_authid(id, authid, 31) get_user_name(id, name, 31) show_activity_key("ADMIN_EXTEND_1", "ADMIN_EXTEND_2", name, mns) log_amx("ExtendMap: ^"%s<%d><%s><>^" extended map ^"%s^" for %d minutes.", name, get_user_userid(id), authid, mapname, mns) console_print(id, "%L", id, "MAP_EXTENDED", mapname, mns) return PLUGIN_HANDLED }</code> And 3 keys language to add : <code>ADMIN_EXTEND_1 = ADMIN: extend map for %d minutes ADMIN_EXTEND_2 = ADMIN %s: extend map for %d minutes MAP_EXTENDED = Map "%s" has been extended for %d minutes</code> Thanks.
This is in AMX Super
It makes non-sens installing 'Amxx super' just for one command which should be integrated by default.
I would try to sneak this in 1.8.1 even though it's a new feature, but getting new language keys is a really huge hassle. :\
After 5 years, language keys are finally done. Will be added for next version.
Pushed changeset: http://hg.alliedmods.net/amxmodx-central/rev/0f878ec60a69 Changelog: Add new command : amx_extendmap (bug 3068, r=sawce)
Commit pushed to master at https://github.com/alliedmodders/amxmodx https://github.com/alliedmodders/amxmodx/commit/6b6fe3c5d9a09807aaaa8a34d8461648c2421dbc Add new command : amx_extendmap (bug 3068, r=sawce) Former-commit-id: 064f10034400fe162072676f4fa362c68c8e8938