что такое metamod в css
Установка и настройка SourceMod
Andrey
пишу код за еду
Вы должны увидеть всплывающее меню, сгруппированное по различным группам опций.
4. Устранение неполадок
Если установка прошла неудачно, изучите следующие три пункта
4.1. Metamod докладывает NOFILE или FAILED
Если после использования команды «meta list» вы видите следующее:
Вы забыли добавить запись SourceMod в addons/metamod/metaplugins.ini файл. Или, если не удалось устранить проблему, убедитесь, что вы используете правильную сборку Sourcemod (ZIP для Windows, TAR для Linux ).
Примечание:
В последних релизах SourceMod в сборке идет *.vdf файл, который находясь в директории metamod подгружает SourceMod, то есть вам не нужно делать запись о SourceMod’e в файле metaplugins.ini.
4.3. Metamod:Source не реагирует на команды
Прочтите инструкцию по установке Metamod:Source и установите его правильно.
Учтите что один из игроков может использовать в своем нике символы к примеру @All, в этом случае действие будет произведено только на нем а не на всех, чтобы получилось на всех используйте знак #, то есть вместо @All используйте #@all
Основные команды админского плагина:
Описание основных папок:
Более подробно расписано в этой теме
Как правильно обновить SourceMod
Если какой либо плагин не работает, перекомпилируйте его используя компилятор вашей текущей версии SourceMod’a.
Базовые плагины входящие в состав SourceMod:
Using Metamod
Client Commands
Metamod v1.17 2003/08/01
by Will Day
http://www.metamod.org/
compiled: Aug 4 2003, 22:43:33 Eastern (debugging)
Client Cvars
"metamod_version" is "1.17"
Installation
If you want to install Metamod by hand, here’s what you have to do:
If a directory you want doesn’t exist, create it.
gamedll "dlls/mp.dll" gamedll_linux "dlls/cs_i386.so" to: gamedll "addons/metamod/dlls/metamod.dll" gamedll_linux "addons/metamod/dlls/metamod_i386.so"
Configuration
File: plugins.ini
Plugins are described in a file «plugins.ini» and each line describes a plugin to load:
Also, the filepath (once expanded to full path name) is expected to be unique within the list of plugins. Thus, a plugin with a fullpathname matching that of a previous plugin is considered a duplicate, and is not loaded.
For instance, in "cstrike/addons/metamod/plugins.ini" these are all valid lines:
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).
The game dll is auto-detected, along the same lines AdminMod operated (looking at the «gamedir»); see «mm_gamedll» below if you want to use a «bot» DLL.
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«.
File: 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»).
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:
where 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
Examples:
debuglevel 0
debuglevel 42
You can override the name of this file by specifying it via the +localinfo field «mm_configfile«.
File: 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«.
File: metagame.ini
Commandline option: +localinfo
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».
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).
Note, paths should use unix-style forward slashes (/) and not backward slashes (\), even on windows platforms.
Commands
All console command functionality is provide by a single command «meta», with multiple sub-commands:
can be either the plugin index number, or a non-ambiguous prefix string matching description or file.
Also, a single cvar is available:
You could then do any of the following to unload the API Trace plugin:
Установка MetaMod Source
Установка SourceMM
Для чего он нужен? Метамод необходим для того, чтобы у вас на сервере работали такие моды как Зомби мод, и Дезматч мод, а также популярный античит Detox!
Теперь приступим к установке.
1. Загрузите подходящий пакет для вашего сервера: есть Linux tarball и файл индекса Windows. Вы можете получить их с официального сайта http://www.sourcemm.net.
2. Откройте архив, вы увидите в нем server_i486.so или server.dll.
3. Найдите вашу Папку модулей на сервере. Это будет либо cstrike либо hl2mp.
4. Создайте в папке модулей папку addons, если она уже есть то не надо. Перейдите в папку addons и создайте в ней папку metamod, а внутри папки metamod папку bin.
5. Создайте новый, текстовый файл с названием metaplugins.ini.
7. Откройте файл в папке модуля названный gameinfo.txt. Вы увидите что-то подобное этому:
CODE
SearchPaths
Game |gameinfo_path|.
Game cstrike
Game hl2
8. Добавьте следующую строку после символа и до записей Game приблизительно это должно выглядит так:
CODE
SearchPaths
GameBin |gameinfo_path|addons/metamod/bin
Game |gameinfo_path|.
Game cstrike
Game hl2
9. Поздравляю. Вы сделали это! Для того, чтобы проверить работоспособность мода, перезапустите ваш игровой сервер и набирайте meta в консоли сервера. Вы должны получить меню.
10. Если файл gameinfo.txt после обновления перезаписался, и ваша строка удалилась, metamod не будет работать. Чтобы устанавливать это, выполните 7 и 8 пункты заново. Либо скачайте METAMOD.VDFфайл для вашей игры и поместите в cstrike/addons/
12. Если у вас Linux то можно создать исполняемый файл который сделает все за ВАС! Создайте новый файл с названием gameinfopatcher и добавьте в него следующие строки:
CODE
/bin/bash
if [ `grep addons/metamod/bin
Символы M являются управляющими. Для того, чтобы набирать их нажмите Ctrl-v Ctrl-m. Для того чтобы запустить данный сценарий, вы должны сделать его исполняемым:
chmod +x gameinfopatcher Теперь перейдите в папку где находится gameinfo.txt
cd cstrike Теперь запустите сценарий следующим образом:
Metamod:Source
Contents
Introduction
Metamod:Source is an API manager and interception handler that sits in between the Half-Life 2 Engine (Source) and a subsequent Game Modification (MOD). It can dynamically load «Metamod:Source Plugins», written in C++, to intercept, override, and hook Engine and GameDLL API interfaces. It also allows for inter-plugin communication. As a backend it contains SourceHook, a powerful library for safely manipulating virtual table hooks.
Where to Download
Metamod:Source is hosted on Source Forge or can be accessed via the Metamod:Source Home Page.
Naming Conventions
The name «SourceMM» is no longer used.
History
Metamod:Source is derived from the Metamod concept of intercepting calls between a game’s engine and mod library. While not based on the same code, the API is designed to be similar and familiar to Half-Life 1 programmers.
SourceMod Core1
Initially, the SourceMod project was started as the next-generation continuation of the AMX Mod X project. It was designed to be a meta-interface layer for inter-communicating plugins. However, as development continued, it was soon realized that the Valve Server Plugin interface would not be sufficient to provide proper engine access.
Pavol Marko (core1 developer) decided to add «SourceHook» to SourceMod core1. It was embedded as a large library for hooking specific virtual table functions. After multiple revisions (see SourceHook history), it became apparent that 1)SourceHook needed to be game and interface generic, and 2)SourceMod and SourceHook needed to be split into two separate projects. The logic behind this was that SourceHook needed to be a layer above Valve Server Plugins, in order to properly manage hooks with the least possibility of conflicts. Furthermore, SourceMod should be a plugin to the SourceHook interface, rather than managing it. This decision can be likened to Admin-Mod’s early decision to split into the first Metamod project.
SourceHook Finalized
After four major revisions, SourceHook was mature enough to be used in a production environment. While PM concentrated on fleshing out SourceHook, BAILOPAN and DS created the GameDLL wrapper portion.
Version 1.0
On May 6, 2005, Metamod:Source 1.0 was released with SourceHook v4.1 as a backend. GameDLL wrapping was achieved by providing the engine with fake copies of the IServerGame* interfaces. Once the true GameDLL location was known it would be loaded by Metamod:Source. The fake interface then directly wrapped calls to the real GameDLL.
Version 1.1
On October 21, 2005, the first major revision of Metamod:Source was released, featuring SourceHook v4.4, internal event listeners, dropped reliance on STL, and rewritten GameDLL hooking code. The Day of Defeat:Source release by Valve Software revealed that the binary interface between the engine and mod wasn’t necessarily public or current, and MM:S’s detection was improved for compatibility and speed. Furthermore, Metamod:Source stopped wrapping the GameDLL interfaces and began using SourceHook to hook them.
Version 1.2
On January 7th, 2006, Metamod:Source was updated for SourceHook v4.3, but received no major API changes.
Version 1.3
On August 16th, 2006, Metamod:Source was updated for SourceHook v4.4, minor API changes, bug fixes, and a sync to the latest HL2SDK.
Version 1.4
On April 5th, 2007, Metamod:Source was updated with API for Valve Server Plugin interface hooking and crash-safe user message enumeration. An experimental gameinfo.txt update tool was also added. No SourceHook changes were made in this release.
Version 1.6
Currently in development, Metamod:Source received a near complete overhaul to abstract engine-specific code to support Orange Box. Additionally, SourceHook received a massive overhaul and is now v5.0, adding global hooks and various major API simplifications. It is the first backwards compatibility break since 1.1.
Design Considerations
Metamod
Originally, Metamod:Source was a plugin co-existing with SourceMod. However, there are factories, pointers, and certain capabilities not possible from a Valve Server Plugin. Furthermore, the Half-Life 2 engine does not properly unload VSPs, making debugging and resource unloading more difficult. Eventually it was decided the added functionality and fine-tuned control outweighed the extra cost of having to configure an intercepting binary.
Plugins
Plugins are specific to Metamod:Source. This means that Valve Server Plugins and Metamod:Source Plugins are entirely separate in the API characteristics. While it is certainly possible to expose the necessary interfaces to VSPs, it creates an added layer of complexity for dealing with things that Metamod:Source might not directly control. For example, when a Metamod:Source plugin is removed at runtime, all of the necessary hooks are also removed. A VSP has no clear callback for detecting this event, therefore it would be more difficult to ensure proper unloading. VSP and MM:S plugins also have different ways of attaching and detaching server cvars and concmds.
By keeping the plugin system isolated, Metamod:Source can also provide a unique set of console commands and API. For example, plugins can listen for certain Metamod:Source-specific events and provide communication channels with other plugins.
Hooking
Metamod:Source is powered by SourceHook, a versatile library for hooking virtual functions. The original Half-Life 1 engine used structs of function pointers which could easily be modified as they passed from one library to another. However, HL2 is comprised almost entirely of pure virtual interfaces. SourceHook was designed for declaring single hooks against a given virtual function and a this pointer, which is not only faster than a blanket hooking system like Metamod’s, but more flexible and precise.
Hooking under Metamod:Source has a number of features that don’t exist in a hooking system style like Metamod’s, and it achieves something closer to detours, rather than Metamod, which is hardcoded. For example
Documentation
For more information on installing, configuring, and coding for Metamod:Source, see Documentation.
The Future
While Metamod:Source is a stable/production product, more features are on the horizon. There are distant plans for a detouring library and a library for efficiently automated signature scanning.
License
Metamod:Source is licensed under the zLib/libpng License. It is free to use for both open-source and proprietary projects.