Very simple plugin that allows to pass some args to any plugins just inside plugins.ini. It scans /configs dir for plugins.ini and plugins-*.ini, per-map configs aren't yet supported.
Sometimes there is a need to configure compiled plugin, but cvars and custom *.ini files seems redundant and annoying.
How to pass:
Code: myplugin.amxx
;@param
my_extra_item.amxx
;@name Wunderwaffe
;@cost 12000
my_stats.amxx
;@host myhost.net
;@db cs_stats
;@user cs_stats
;@pass 123456How to read:
Code:
public plugin_init()
{
...
read_inline_config()
...
}
read_inline_config()
{
new num_records = InlineConfig_NumRecords()
new record_data[100]
for(new record = 1; record <= num_records; record++)
{
InlineConfig_GetRecord(record, record_data, charsmax(record_data))
...
}
}
Comments on one line with args won't be recognized, thus args may inclue ';' and '//'.
Code: myplugin.amxx
;@http://www.amxmodx.org/
;@one;two;three;No comment lines allowed between plugin and its args. Comments after plugin name are still allowed.
Code: good_plugin.amxx debug // this plugin rocks
;@this arg will pass
bad_plugin.amxx
;yay!
;@this arg won't pass
;disabled_plugin.amxx // here is a reason for such rule
;@this arg won't pass
Attached Files InlineConfig.zip (7.7 KB)
Wyświetl pełny artykuł
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
[forums.alliedmods.net] Inline Config API
Temat rozp. Adminek AMXX.PL, 14.12.2011 16:18
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych