Реклама плагин для css v34
This is a simple advertisements plugin. It supports center, chat, hint, menu and top messages.
sm_advertisements_enabled (0/1, def 1)
Enable/disable displaying advertisements.
sm_advertisements_file (def «advertisements.txt»)
File to read the advertisements from. Useful if you’re running multiple servers from one installation, and want to use different advertisements per server.
sm_advertisements_interval (def 30)
Number of seconds between advertisements.
sm_advertisements_random (0/1, def 0)
Enable/disable random advertisements. When enabled, advertisements are randomized on every map change and reload.
sm_advertisements_reload
Server command to reload the advertisements.
By default the plugin reads from addons/sourcemod/configs/advertisements.txt, which has this format:
Make sure to save this file as UTF-8 (without BOM), otherwise special characters will not work!
The following types are supported:
center: A center message, like sm_csay.
chat: A chat message, like sm_say. A list of supported colors can be found on https://github.com/PremyslTalich/ColorVariables.
hint: A hint message, like sm_hsay.
menu: A menu message, like sm_msay, but without the title or the Exit-option. Pressing 0 will still hide the message, but it will block 1-9 from switching weapons while it’s showing.
top: A top-left message, like sm_tsay. It supports any of the colors listed on https://www.doctormckay.com/morecolors.php, or custom colors with .
Multiple types per advertisement are allowed, so you can show a different message in multiple places at the same time.
The message supports the following variables: , , , , and . Next to that you can print the value of any cvar by enclosing the name with <>, for example . Use \n for newlines, which works with center, chat, hint and menu messages.
A couple of examples are given in the supplied advertisements.txt.
This field is optional. It accepts a list of flags of players who will not see the advertisement if they have any of those flags. If left empty, only admins will see the advertisement. If omitted everyone will see the advertisement.
- 2.1
- Added convar for random advertisements.
- Added variable with MapChooser support.
- Allow more chat colors for Insurgency and Source 2013 games.
- Fixed variable for workshop maps.
- Support \n in chat messages on CS:GO.
- Throw an error when using on an unsupported game.
- Fall back to stock Source engine chat colors instead of CS:GO colors.
- Implemented proper color support for chat messages.
- Implemented custom colors for top-left messages.
- Instead of being able to show the same message in different places, you can now show different messages at the same time.
- Removed support for and boolean cvars to simplify plugin.
- Added Updater support.
- CS:GO support
- Bug fixes
- Fixed .
- Added \n for newlines.
- Support for boolean cvars has been added.
- was added to say messages.
- Multiple types per advertisement are now supported.
- Multiple flags per advertisement are now supported, with the possibility to leave it empty so they only show to admins.
- Added sm_advertisements_file in case you’re running multiple servers from one installation, and want different advertisements per server.
- Made center messages show for 5 seconds, so they don’t disappear anymore within 2 seconds.
- Switched to a KeyValues file, the format is explained above and shown in the attached advertisements.txt.
- I skipped it! Why? Because I can
- Support for cvars has been added, for example to print the next map use . Because of this has been removed. I haven’t been able to get bounds to work yet (the upper bound of for example mp_friendlyfire always returned 0.0) so for now boolean cvars just show 0/1.
- was added and obviously shows the server’s tickrate (thanks to Nican’s code he posted on the forums).
- was added and shows a 24-hour clock.
- SayText2 is now only used when you use , otherwise it uses PrintToChat. This should fix the problems with mods that don’t support SayText2 (Insurgency, and contrary to what I thought earlier, Day of Defeat: Source doesn’t support it either), so as long as you don’t use you should be good on those mods. Two notes: is actually red in DoD:S, and SayText2 in CS:S produces the same tick sound that you hear when someone types something. So if you use in CS:S note that it will give a tick sound when that ad shows.
- Advertisements can now be hidden from clients with a specific flag by adding that flag’s letter after the type, like this: SA This say ad will be hidden from clients with a reserved slot
Of course by omitting the letter it will be shown to everyone.
- Added colors to chat messages, it now has (white), (the color of on the team you’re on, or light green if you’re a spectator) and (green). Those are the colors in TF2, they might be different in other games. You can just use them wherever you want, for example: S Hello there
- Split into and where returns a 12-hour clock with AM/PM.
- The timer is now restarted when you change sm_advertisements_interval, it doesn’t require a map change anymore.
- Initial release
Плагин текстовой рекламы 0.5.5
Описание:
Это простой плагин рекламы основан на basechat. Он поддерживает такие команды как : say, csay, hsay, msay и tsay.Настройки:
sm_advertisements_enabled (0/1, по умолчанию 1)
Включить/отключить отображение рекламы
sm_advertisements_ file (по умолчанию «advertisements.txt»)
Файл из которого будет считываться реклама. Полезно если вы используете несколько серверов в одной установке, и вы хотите использовать различные рекламные объявления для каждого сервера.
sm_advertisements_interval (по умолчанию 30)
Количество секунд между отображением рекламы.
sm_advertisements_reload
Команда серверу для перезагрузки рекламы в файле advertisements.txt.По умолчанию плагин читает рекламу из файла configs/advertisements.txt, который имеет следующий формат:
Чтобы выводить рекламу в несколько строк, используйте \n для перехода на новую строку.
Немного о структуре файла:
Поле type:
C сообщение по центру, как после команды sm_csay.
H отображение сообщения, как после команды sm_hsay.
M сообщение в меню, как после команды sm_msay, но без названия или Выйти варианта. 0- по-прежнему будет скрывать сообщение. Будет блокировать 1-9 с переключение оружия до тех пор, пока она показывается.
S сообщение в области чата, как при команде sm_say. Это поддерживает следующие цвета: , , и . и к сожалению не работает в одной рекламе, их нужно использовать только по одиночке. Например: Current Map:
T сообщение в верхнем левом углу, как после команды sm_tsay. Она поддерживает один из следующих цветов: , , , , , , , , , , , и .Вы можете пропустить цвета, если вы просто хотите нормальный цвет. Например, чтобы получить более оранжевое сообщение, наберите текст: Текст здесьНесколько видов отображения рекламы одновременно разрешены, так что вы можете показывать рекламу во многих местах одновременно.
Поле text:
Это поле поддерживает следующие переменные:
, , , , и .
Далее вы можете написать переменные , которые должны быть заключены в <> скобки.
Например, вы можете использовать , чтобы показать название следующей карты.
Последнее, но не менее важное, поддержка булевой cvar, вы можете выводить OFF/ON вместо 0/1. Для этого используйте . Например, выведет если mp_friendlyfire установлен в 0 OFF, и, если он установлен в 1 ON. Если вы хотите выводить нечто иное, чем OFF / ON, вы должны открыть исходный код плагина, внести изменения в верхней части и пере компилировать его. Также поддерживается \n для перехода на новую строку (подтверждена работа для C, M и S типов сообщений). Несколько примеров приведены в прилагаемом файле advertisements.txt.Библиотека цветов от Dr.McKay: More Colors
Поле flags:
Это поле является обязательным для заполнения. В нем хранятся флаги администраторов которые не будут видеть рекламу. Если оставить пустым, только администраторы будут видеть рекламу.
Если пропущены все увидят рекламу.Примечание: чтобы отображался русский текст нужно сохранить файл advertisements.txt в кодировке UTF-8 без BOM/Signature (without signature), иначе плагин не будет отображать рекламу по кругу.
Версия от Danyas (облегченная)
В ней убрана проверка OnGameFrame (TickRate), за основу взята последняя версия с источника.[ClientMod] Advertisements 0.6.3
Advertisements 0.6.2 — имеет два файла настройки рекламы, вместо одного.
В одном реклама с обычными цветами, для обычных клиентов. В другом реклама с цветами от MoreColors, для клиентов с ClientMod. .danil rau
Участник
Тоесть он сверянт, кто играет с клиент мода и показываем эту рекламу только игрокам с cm? Игроки с обычной css не видят этой рекламы?
StormX
Участник
Тоесть он сверянт, кто играет с клиент мода и показываем эту рекламу только игрокам с cm? Игроки с обычной css не видят этой рекламы?
danil rau
Участник
Paranoiiik
хачю клиентмод
Тоесть он сверянт, кто играет с клиент мода и показываем эту рекламу только игрокам с cm? Игроки с обычной css не видят этой рекламы?
danil rau
Участник
Paranoiiik
хачю клиентмод
Не знаю, о каком ещё «adverts» речь, но при дефолтном Advertisements игроки с любого клиента видят обычные цвета.
StormX
Участник
L 10/11/2019 — 21:48:32: [SM] Fatal error encountered parsing translation file «advertisements.phrases.txt»
L 10/11/2019 — 21:48:32: [SM] Error (line 0, column 0): Stream failed to openParanoiiik
хачю клиентмод
L 10/11/2019 — 21:48:32: [SM] Fatal error encountered parsing translation file «advertisements.phrases.txt»
L 10/11/2019 — 21:48:32: [SM] Error (line 0, column 0): Stream failed to openvertigo
Участник
My Server Console gets filled with these warning messages.
How to fix this?Paranoiiik
хачю клиентмод
My Server Console gets filled with these warning messages.
How to fix this?You probably specified too long a message in the config file.
The length of the message exceeded the limit allowed by the game engine.vertigo
Участник
Kill_Note#
Участник
Не работает реклама
L 04/24/2020 — 14:05:57: [SM] Unable to load plugin «CM_Advertisements.smx»: Could not find required plugin «clientmod»
Что делать?Paranoiiik
хачю клиентмод
Не работает реклама
L 04/24/2020 — 14:05:57: [SM] Unable to load plugin «CM_Advertisements.smx»: Could not find required plugin «clientmod»
Что делать?Kill_Note#
Участник
Ну он не загружает этот плаген, причина нет плагена клиент мод, а хотя он установлен , не понимаю что ещё делать, помогите
Paranoiiik
хачю клиентмод
Ну он не загружает этот плаген, причина нет плагена клиент мод, а хотя он установлен , не понимаю что ещё делать, помогите
Kill_Note#
Участник
L 04/24/2020 — 14:05:57: [SM] Unable to load plugin «CM_Advertisements.smx»: Could not find required plugin «clientmod»
L 04/24/2020 — 14:12:59: [SM] Unable to load plugin «ClientMod.smx»: Native «Event.FireToClient» was not found
L 04/24/2020 — 14:12:59: [SM] Unable to load plugin «CM_Advertisements.smx»: Native «DataPack.DataPack» was not foundВот это в логах постоянно
Paranoiiik
хачю клиентмод
L 04/24/2020 — 14:05:57: [SM] Unable to load plugin «CM_Advertisements.smx»: Could not find required plugin «clientmod»
L 04/24/2020 — 14:12:59: [SM] Unable to load plugin «ClientMod.smx»: Native «Event.FireToClient» was not found
L 04/24/2020 — 14:12:59: [SM] Unable to load plugin «CM_Advertisements.smx»: Native «DataPack.DataPack» was not foundВот это в логах постоянно