hlmod.hu https://hlmod.hu/ |
|
03. Metamod használata! https://hlmod.hu/viewtopic.php?f=24&t=5356 |
Oldal: 1 / 1 |
Szerző: | kiki [2012.07.22. 14:08 ] |
Hozzászólás témája: | 03. Metamod használata! |
Fordíthatjátok A Metamod használata Kliens parancsok: Kód: meta version - ki írja a szerveren található metamód verziót az alábbi formában: Kód: meta list - ki írja a(z) jelenleg futó pluginokat az alábbi formában: Telepítés: 1; Töltsd le a metamod legfrissebb verzióját itt: http://amxmodx.crys.hu/site/forum/viewtopic.php?f=78&t=5352 2; Másold fel a binári fájlt(win32 esetén .dll, linux esetén .so) a cstrike/addons/metamod/dlls/ mappába, tehát így nézzen ki: cstrike/addons/metamod/dlls/metamod.dll | cstrike/addons/metamod/dlls/metamod.so |. Ha valamelyik mappa hiányzik hozd létre! 3; Keresd ki a játék könyvtárában a liblist.gam fájlt, (counter strike esetén: cstrike/liblist.gam). És cseréld ki az alábbi sorokat: gamedll "dlls/mp.dll" gamedll_linux "dlls/cs_i386.so" Erre: --> gamedll "addons/metamod/dlls/metamod.dll" gamedll_linux "addons/metamod/dlls/metamod_i386.so" (Elég csak azt a sort amelyik operációs rendszert használod, gamedll -> windows , gamedll_linux -> linux) 4; Az addons/metamod/ könyvtárban hozz létre egy plugins.ini fájlt! Ebbe fogjuk később írni a pluginokat! Ezzel a metamód telepítése meg is történt! Beállítások: Az alábbi parancsokat a futtatási parancssorba kell beírni, bérelt játékszervernél ez nem valósítható meg a legtöbb helyen! A "$gamedir" parancs mutat a játék könyvtárába, counter-strike esetén: "cstrike"! +localinfo mm_configfile <fájl> +localinfo mm_pluginsfile <fájl> config.ini beállítás: plugins_file <fájl> $gamedir/addons/metamod/plugins.ini $gamedir/metamod.ini $localinfo mm_execcfg <fájl> config.ini beállítás: exec_cfg <fájl> $gamedir/addons/metamod/exec.cfg $gamedir/metaexec.cfg $localinfo mm_gamedll <fájl> config.ini beállítás: gamedll <fájl> Fájl:plugins.ini Alap elérés:: $gamedir/addons/metamod/plugins.ini, példa: "cstrike/addons/metamod/plugins.ini". A pluginok betöltése az alábbi módon történik: <operációs rendszer*> <fájl elérése> [<leírás>] A mezőket szóközzel válaszd el! Operációs rendszer lehet: "linux" vagy "win32", más nem, ezt ne is kérdezd!. Fájl elérése a .dll/.so fájl helyére mutasson. Az elérési mappa akár hol lehet... A perjeleket UNIX típusúval kell csinálni (/) (Jobbra döltött). Description is an optional description of the plugin, used in place of the plugin's internal name in log messages and console output. Whitespace in the description is allowed; quoting is unnecessary. Kommenteket így tudsz csinálni: ("#") ("//"), amelyik sorban ez található elől azt nem fogja érzékelni! Egy példa a "cstrike/addons/metamod/plugins.ini" fájl helyes kitöltésére: Kód: // linux dlls/mybot.so Note that order in the plugins.ini file is significant. Plugins are loaded and accessed in the order specified, so ordering can be important, depending on the plugin(s). A fájl ujra betöltéséhez pályaváltás szükséges vagy használd a "meta refresh" konzol parancsot!; (lásd lejjebb!). Ezek történnek betöltéskor: - Betölti a pluginokat! - Betölti a beállításokat! You can override the name of this file by specifying it via the +localinfo field "mm_pluginsfile". For compatibility with previous versions, Metamod will also look for a file "metamod.ini" under the gamedir, ie "cstrike/metamod.ini". Fájl: config.ini Default location: $gamedir/addons/metamod/config.ini, ie "cstrike/addons/metamod/config.ini". This contains basic config information, at the moment duplicating most of the +localinfo variables, but allowing for more flexible expansion of config options in the future. Also, it provides somewhat more reliable options setting, since +localinfo munges some argument values (in particular, pathnames with leading dots, ie "../dlls/blah.dll"). Basic format is: <option> <value> Fields are whitespace delimited (tabs/spaces). Comments are recognized at only the beginning of a line, and can be in either shell style ("#") or c++ style ("//"). The following is a list of currently recognized options, their defaults, and examples of usage: debuglevel <number> where <number> is an integer, 0 and up. Sets the initial debugging level for metamod (same as cvar "meta_debug"). Default is normally 0. If hlds is run with "-dev", default is 3. Overridden by: +localinfo mm_debug <number> Examples: debuglevel 0 debuglevel 42 gamedll <path> where <path> is an absolute path, or a path relative to the gamedir. Overrides the auto-detected gamedll, in particular for bots. Default is empty, with gamedll being auto-recognized based on the gamedir. Overridden by: +localinfo mm_gamedll <number> Examples: gamedll dlls/hl.dll gamedll ../podbot/podbot.dll gamedll /home/bots/dlls/mybot.dll plugins_file <path> where <path> is an absolute path, or a path relative to the gamedir. Overrides the default filename containing the MM plugins to load. Default is "addons/metamod/plugins.ini". Overridden by: +localinfo mm_pluginsfile <number> Examples: plugins_file cfg/clanmode.ini plugins_file ../private.ini plugins_file /home/half-life/testing.ini exec_cfg <path> where <path> is a path relative to the gamedir. NOTE! This cannot be an absolute path, as hlds will not "exec" absolute pathnames. Overrides the default filename containing hlds commands to run just after loading Metamod. Default is "addons/metamod/exec.cfg". Overridden by: +localinfo mm_execcfg <number> Examples: exec_cfg configs/debugging.cfg exec_cfg ../clan/match.cfg You can override the name of this file by specifying it via the +localinfo field "mm_configfile". Fájl: exec.cfg Default location: $gamedir/addons/metamod/exec.cfg, ie "cstrike/addons/metamod/exec.cfg". This is necessary for plugins that need to have settings specified prior to early API routines like ServerActivate, since autoexec.cfg is read too early and server.cfg is read to late. In particular, I found this necessary for the Trace plugin, in order to trace routines like RegUserMsg which are called during ServerActivate. You can override the name of this file by specifying it via the +localinfo field "mm_execcfg". For compatibility with previous versions, Metamod will also look for a file "metaexec.cfg" under the gamedir, ie "cstrike/metaexec.cfg". Parancssor beállítás: +localinfo Several of Metamod's configuration options can be specified by the "+localinfo" facility on the hlds command line. This is similar to the "setinfo" console command, where the syntax is: +localinfo <field> <value> Current localinfo fields recognized by Metamod: mm_configfile Specifies the file that lists config options, instead of using the file config.ini. The <value> should be the pathname of the config file, either absolute path or path relative to the gamedir. mm_pluginsfile Specifies a file that lists the Metamod plugins to load, instead of using the file plugins.ini. The <value> should be the pathname of the plugins file, either absolute path or path relative to the gamedir. mm_execcfg Specifies a file that contains cvar or other configs to be exec'd after loading the plugins, instead of using the file exec.cfg. The <value> should be the pathname of the exec file, either absolute path or path relative to the gamedir. mm_gamedll Specifies a game or Bot DLL to be used instead of the normal gameDLL. The <value> should be the pathname of the DLL, either absolute path or path relative to the gamedir. This replaces using the metagame.ini file. With previous versions of AdminMod (2.10 and earlier), this same functionality was provided by the file "admin.ini". mm_debug Specifies an initial meta_debug value. Note that each localinfo field can have only one value. If specified more than once on the command line, only the last one will be recognized. (In particular, trying to use mm_gamedll to load multiple dll-style bots will not work. In a case like that, the multiple dll's must be chained together). Néhány példa:: ./hlds_run -game cstrike +localinfo mm_pluginsfile mylist.ini ./hlds_run -game cstrike +localinfo mm_execcfg mysettings.cfg ./hlds_run -game cstrike +localinfo mm_gamedll dlls/pod_bot.so ./hlds_run -game cstrike +localinfo mm_debug 7 Note, paths should use unix-style forward slashes (/) and not backward slashes (\), even on windows platforms. Parancsok All console command functionality is provide by a single command "meta", with multiple sub-commands: usage: meta <command> [<arguments>] valid commands are: version - display Metamod version info list - list plugins currently loaded cmds - list console cmds registered by plugins cvars - list cvars registered by plugins refresh - load/unload any new/deleted/updated plugins config - show config info loaded from config.ini load <name> - find and load a plugin with the given name unload <plugin> - unload a loaded plugin reload <plugin> - unload a plugin and load it again info <plugin> - show all information about a plugin pause <plugin> - pause a loaded, running plugin unpause <plugin> - unpause a previously paused plugin retry <plugin> - retry a plugin that previously failed its action clear <plugin> - clear a failed plugin from the list force_unload <plugin> - forcibly unload a loaded plugin require <plugin> - exit server if plugin not loaded/running where <plugin> can be either the plugin index number, or a non-ambiguous prefix string matching description or file. Also, a single cvar is available: meta_debug - set debugging level For instance with: Currently loaded plugins: description stat pend file vers src load unlod [ 1] Trace HLSDK API RUN - mm_trace_i386.so v0.90 ini ANY Pause [ 2] adminmod RUN - admin_MM.so v2.11 ini Start Start [ 3] stub RUN - mm_stub_i386.so v0.90 ini ANY Pause 2 plugins, 2 running You could then do any of the following to unload the API Trace plugin: meta unload 1 meta unload trace meta unload mm_trace Plugin Betöltve/Nem betöltve folyamatban Through the process of loading and unloading, a plugin can be in one of several different states ('stat' column in the 'meta list' output): BADFILE - A bővítmény fájlai nem találhatóak, vagy nem érvényes Metamod bővítmény. OPENED - A bővítmény fájlai nem találhatóak. Van egy érvényes Metamod bővítmény, és készen áll hogy betöltsön. FAILED - A bővítmény fájlai próbált betölteni, de nem tudta befejezni valamilyen okból. RUNNING - A bővítmény fájl betöltve. Aktív, és fut. PAUSED - A bővítmény fájl betöltve, de átmenetileg ki van kapcsolva. Also through the operation process, a plugin can have a pending "action" to next take (indicated by the 'pend' column in the 'meta list' output), and can be one of: LOAD - Nyisd meg, és nézd meg a bővítmény fájlait. ATTACH - Rögzítse a bővítményt a játékba, azaz aktiválja. UNLOAD - Vegye ki a plugint a futó játékból, és zárja be a fájlt. RELOAD - Vedd ki vagy zárd be, és nyissd meg újból a plugint, például ha a forrása a luginnak változott. Példa a kimenetre Kód: Itt van egy másik példa a kimenetre: |
Oldal: 1 / 1 | Minden időpont UTC+02:00 időzóna szerinti |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |