Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSMscript - Load sourcemod plugins on specific maps (vscript for older games)


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Github

https://github.com/bottiger1/mscript

What is this?

This plugin will automatically load a plugin with the name of the map in the addons/disabled/mscript directory.

When the map ends, the plugin will be unloaded.

For example if you made a plugin in addons/disabled/mscript/ctf_2fort.smx it will be loaded when your server changes to ctf_2fort.

When the map ends it will be unloaded.

Why is this needed?

Valve added real scripting languages for mappers called vscript in newer games like l4d and csgo but never bothered to port it back to older games such as TF2.

While mappers are making use of vscript in these new games, maps in older games are stagnating and some mappers are even changing games so they can use vscripts.

This is not necessary at all, almost anything you can do in vscript is possible in sourcemod and sourcemod can also do things that vscript cannot do.

Why do you need this plugin to run a plugin

This plugin is simply a framework that makes loading and unloading map specific plugins cleanly. One major reason why people don't want to use plugins is because sourcemod automatically loads them all on startup and then you'd have 20 map specific plugins taking up ram and cpu. This plugin solves that issue completely.

Examples

https://github.com/bottiger1/mscript/tree/main/examples

Commands

These commands are mostly for debugging purposes. You do not need these for normal usage.

mscript_load [plugin]
Load a plugin in the addons/disabled/mscript directory. Do not add .smx to the end. Plugins with the same name of the map will be loaded automatically so you do not need this unless you want to load more plugins.

mscript_unload
Unload all plugins loaded through mscript_load this map.

mscript_reload
Reload all plugins loaded through mscript_load this map.

TODO

Add more examples of map to plugin communication

Add example of custom entity inputs

Add example of custom filters

I may add more examples depending on how many mappers are interested in using this. You can also submit an example and I will add it.

Attached Files
File Type: sp Get Plugin or Get Source (mscript.sp - 2.6 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...