About Rules
Useful Rules Agreement Plugin. Allowing you to prevent players who do not agree with your rules from playing on the server.
Features:
- Disables the ability to use the keyboard, mouse, commands, chat and voice chat in the game until the rules window is closed;
- Inability to press the accept button until you have read all the pages;
- A timer after which the player will be kicked if they do not accept the rules;
- A consecutive refusals counter, upon reaching which the player will be banned;
- Adds 4 new hooks for developers. 2 of them can be overrided;
- Effect of opening the rules;
- Effect of accepting the rules;
- The ability to enable/disable rules;
- The ability to request players to agree to the rules again, using a command.
Permissions:
- rules.ignore - Provides the ability to ignore rules agreements.
- rules.admin - Provides the ability to ignore rules agreements. Also includes the ability to use enable/disable and reask commands.
Default config file:
{
"Use GameTip for messages?": true,
"Date of rules update.": "2023-11-05",
"Enable agreement with rules requirement?": true,
"Should a player be prevented from using commands(chat.say from console) until they agree to the rules?": true,
"Should a player be prevented from using chat(chat.say from console) until they agree to the rules?": true,
"Should a player be prevented from using voice chat until they agree to the rules?": true,
"Is it necessary to request consent from all players with the rules after plugin (re)load or enabled?": true,
"The time in seconds after which a player will be kicked(0 to disable).": 120.0,
"The number of rule rejects in a row after which a player will be banned(0 to disable).": 5,
"Show Rules Sound - Prefab Name(leave it blank to disable)": "assets/bundled/prefabs/fx/invite_notice.prefab",
"Rules Accepted Sound - Prefab Name(leave it blank to disable)": "assets/prefabs/misc/xmas/advent_calendar/effects/open_advent.prefab",
"UI. MainBackground - Color": "0.1 0.1 0.1 0.7",
"UI. Text Title - Font": "RobotoCondensed-Bold.ttf",
"UI. Text Title - Font Size": 16,
"UI. Text Title - Font Color": "1 1 1 1",
"UI. Text - Font": "RobotoCondensed-Regular.ttf",
"UI. Text - Font Size": 14,
"UI. Text - Font Color": "1 1 1 1",
"UI. Text LastUpdate - Font": "RobotoCondensed-Regular.ttf",
"UI. Text LastUpdate - Font Size": 10,
"UI. Text LastUpdate - Font Color": "1 1 1 1",
"UI. Text Accept-Decline buttons - Font": "RobotoCondensed-Regular.ttf",
"UI. Text Accept-Decline buttons - Font Size": 14,
"UI. Text Accept button - Font Color": "1 1 1 1",
"UI. Text Decline button - Font Color": "1 1 1 1",
"UI. Text - FadeIn": 1.0,
"UI. Panel - Background Color": "0.9 0.9 0.9 0.7",
"UI. Panel - Main AnchorMin": "0.25 0.15",
"UI. Panel - Main AnchorMax": "0.75 0.9",
"UI. Panel Title - Background Color": "0.1 0.65 0.95 0.9",
"UI. Panel Title - Main AnchorMin": "0 0.895",
"UI. Panel Title - Main AnchorMax": "1 1",
"UI. Panel Title Icon - Sprite": "assets/icons/warning.png",
"UI. Panel Mid - Background Color": "0 0 0 0",
"UI. Panel Mid - Main AnchorMin": "0 0.12",
"UI. Panel Mid - Main AnchorMax": "1 0.895",
"UI. Progress - Background Color": "0.2 0.56 1 1",
"UI. Panel Footer - Background Color": "0.1 0.65 0.95 0.9",
"UI. Panel Footer - Main AnchorMin": "0 0",
"UI. Panel Footer - Main AnchorMax": "1 0.12",
"UI. Accept button - Background Color": "0.2 0.56 1 1",
"UI. Accept button - Inactive Background Color": "0.9 0.9 0.9 0.7",
"UI. Decline button - Background Color": "0.9 0.9 0.9 0.7",
"UI. Page button - Background Color": "0.9 0.9 0.9 0.7",
"UI. Page button - Next": ">",
"UI. Page button - Previous": "<",
"UI. Page button - Font": "RobotoCondensed-Regular.ttf",
"UI. Page button - Font Size": 14,
"UI. Page button - Font Color": "1 1 1 1"
}
Note: List of available fonts: https://umod.org/guides/rust/basic-concepts-of-gui#fonts.
Localization:
EN: { "RulesAccepted": "Thank you for accepting our terms! Enjoy the game!", "RulesRestrictCommand": "You are not allowed to use commands until you agree to the rules!", "RulesRestrictChat": "You are not allowed to use chat until you agree to the rules!", "RulesRestrictVoiceChat": "You are not allowed to use voice chat until you agree to the rules!", "RulesEnabled": "The requirement to agree with the rules is enabled!", "RulesDisabled": "The requirement to agree with the rules is disabled!", "RulesAlreadyEnabled": "The requirement to agree with the rules is already enabled!", "RulesAlreadyDisabled": "The requirement to agree with the rules is already disabled!", "RulesReAsk": "All players have been sent the agreement with the rules!", "RulesNotFound": "Argument {0} not found!", "KickReason": "You have been kicked because you declined our rules!", "BanReason": "You have been banned because you declined our rules {0} times in a row!", "BtnAccept": "Accept", "BtnDecline": "Decline", "Year": "Year", "January": "January", "February": "February", "March": "March", "April": "April", "May": "May", "June": "June", "July": "July", "August": "August", "September": "September", "October": "October", "November": "November", "December": "December", "RulesTitle": "Terms Of Service", "RulesLastUpdate": "Last updated on <color=brown>{0}</color>", "Rules_1": "<b>1. Information</b>\n\n<b>1.1</b> - Lack of knowledge of the rules does not exempt you from responsibility.\n<b>1.2</b> - By playing on the server, you automatically agree to all the rules listed below.\n<b>1.3</b> - If you have already been caught using cheats/macros or exploiting on another server/project, and there is proof against you, we reserve the right to ban you without further investigation.\n<b>1.4</b> - The administration determines the punishment for a player based on the severity of the violation and the circumstances. Violators may receive a warning or a permanent ban (there is no temporary bans). Bans apply to all servers within the project.\n<b>1.5</b> - The administration does not compensate for in-game items lost due to your errors, technical server/hosting issues, game bugs, or contact with rule violators.\n<b>1.6</b> - The administration does not interfere in player-to-player relationships. You are solely responsible for the people you choose to play with, so if a player deceives you, there will be no punishments for them from us.\n<b>1.7</b> - You are responsible for all your accounts. If one account is banned, the ban applies to all your accounts. The same applies if one of your accounts has a game ban (EAC).\n<b>1.8</b> - Impersonating a member of the server's administration is prohibited.", "Rules_2": "<b>2. Gameplay</b>\n\n<b>2.1</b> - It is prohibited to use/store/purchase/distribute third-party software or any other means that provide an advantage over other players.\n<b>2.2</b> - Using cheat services is forbidden.\n<b>2.3</b> - Exploiting game bugs is not allowed.\n<b>2.4</b> - Exceeding the player limit in a team is prohibited:\n<b>+</b> Alliances or truces with other players are not allowed if the total number of players involved exceeds the server's limitations;\n<b>+</b> Frequent changes of allies will be considered a rule violation, as will playing with another player while your teammate is AFK or not nearby;\n<b>+</b> Changing teammates temporarily is not allowed if the replaced teammate intends to continue playing with you;\n<b>+</b> Changing a partner is allowed if your previous partner will not be in contact with you in the future.", "Rules_3": "<b>3. In-Game Chat/Voice Chat</b>\n\n<b>3.1</b> - Discussion of politics, religion, immoral, and other inappropriate topics is prohibited.\n<b>3.2</b> - Inciting national, racial, or religious hatred or insulting other players and individuals is forbidden.\n<b>3.3</b> - Posting links to third-party services and websites in the chat is not allowed.\n<b>3.4</b> - Spamming (repeatedly posting meaningless phrases or characters) or sending identical messages in a short period of time is prohibited.\n<b>3.5</b> - Selling or pretending to sell cheats/macros is not allowed.\n<b>3.6</b> - Proposing actions that lead to an unwanted server exit is prohibited. Such actions include, for example, pressing <b>alt+f4</b>, typing <b>disconnect</b> in the console, and similar actions whose meanings other players may not be aware of.\n<b>3.7</b> - The administration reserves the right to mute or block a player in the chat if they behave inappropriately or disrespectfully towards other players.\n<b>3.8</b> - Selling/buying in-game items for real currency, crypto or skins is prohibited.", "Rules_4": "<b>4. In-Game Check</b>\n\n<b>4.1</b> - In-Game checks are conducted exclusively through the <b>Discord</b> program. Every player on our project must have the ability to access it for the purpose of undergoing in-game checks.\n<b>4.2</b> - Calls for in-game checks are made only through in-game notifications and never through voice or text chat.\n<b>4.3</b> - If a player leaves the server, ignores a in-game check, or refuses to participate in it, they will immediately receive a ban.\n<b>4.4</b> - Clearing your PC before a in-game check is prohibited.\n<b>4.5</b> - Refusal to provide the necessary information for the in-game check or inappropriate behavior will result in a ban.\n<b>4.6</b> - If a player is banned as a result of a in-game check (including bans for refusal, ignoring, leaving the server, and providing incorrect contact information), their entire team will also be banned.\n\n<b>+</b> You have the full right to refuse to undergo a in-game check, but in this case, you and your allies will be banned.\n<b>+</b> Leaving the server, providing incorrect contact information, and ignoring the in-game check will also be considered a refusal.\n<b>+</b> If you agree to undergo the in-game check, you automatically allow the administration to install third-party programs necessary for checking your PC(e.g., AnyDesk, RCC, etc.).", "Rules_5": "<b>Appeal Process</b>\nOne month after the ban, you have the ability to submit an appeal, but only if the ban was not for cheats or macros.\nAppeals can be submitted on our website.", "Rules_6": "Rules_6", "Rules_7": "Rules_7", "Rules_8": "Rules_8", "Rules_9": "Rules_9", "Rules_10": "Rules_10" } RU: { "RulesAccepted": "Спасибо, что приняли наши условия! Приятной вам игры!", "RulesRestrictCommand": "Вам запрещено использовать команды пока вы не согласитесь с правилами!", "RulesRestrictChat": "Вам запрещено использовать чат пока вы не согласитесь с правилами!", "RulesRestrictVoiceChat": "Вам запрещено использовать войс чат пока вы не согласитесь с правилами!", "RulesEnabled": "Требование согласия с правилами включено!", "RulesDisabled": "Требование согласия с правилами выключено!", "RulesAlreadyEnabled": "Требование согласия с правилами уже включено!", "RulesAlreadyDisabled": "Требование согласия с правилами уже выключено!", "RulesReAsk": "Всем игрокам разослано соглашение с правилами!", "RulesNotFound": "Аргумент {0} не найден!", "KickReason": "Вы были исключены, так как вы отклонили наши правила!", "BanReason": "Вы были заблокированы, так как вы в {0} раз подряд отклонили наши правила!", "BtnAccept": "Принимаю", "BtnDecline": "Отказываюсь", "Year": "года", "January": "Января", "February": "Февраля", "March": "Марта", "April": "Апреля", "May": "Мая", "June": "Июня", "July": "Июля", "August": "Августа", "September": "Сентября", "October": "Октября", "November": "Ноября", "December": "Декабря", "RulesTitle": "Условия использования", "RulesLastUpdate": "Последнее обновление <color=brown>{0}</color>", "Rules_1": "<b>1. Информация</b>\n\n<b>1.1</b> - Не знание правил не освобождает Вас от ответственности.\n<b>1.2</b> - Играя на сервере Вы автоматически соглашаетесь со всеми нижеперечисленными пунктами правил.\n<b>1.3</b> - Если Вы уже были замечены с читами/макросами или использованием просвета на другом сервере/проекте и на вас есть пруфы - мы имеем право забанить Вас без проверки.\n<b>1.4</b> - Администрация сама выбирает наказание для игрока в зависимости от степени нарушения и обстоятельств. Нарушитель может получить как предупреждение, так и перманентный бан(временных блокировок нет). Блокировка выдаётся на всех серверах проекта.\n<b>1.5</b> - Администрация не компенсирует игровые ценности, утраченные по причине вашей ошибки, технических проблем на сервере/хостинге, багов игры или контакта с нарушителями.\n<b>1.6</b> - Администрация не вмешивается во взаимоотношения игроков, за тех с кем вы играете ответственны только Вы, поэтому в случае если игрок вас обманет — ему ничего за это не будет.\n<b>1.7</b> - Вы несете ответственность за все свои аккаунты. Получив бан на одном аккаунте - Вы получите его и на остальных аккаунтах. То же самое будет если на одном из ваших аккаунтах имеется игровая блокировка(EAC).\n<b>1.8</b> - Запрещено выдавать себя за члена Администрации сервера.", "Rules_2": "<b>2. Геймплей</b>\n\n<b>2.1</b> - Запрещено использовать/хранить/приобретать/распространять стороннее ПО или любые другие средства, позволяющие получить преимущество над другими игроками.\n<b>2.2</b> - Запрещено использование услуг читеров.\n<b>2.3</b> - Запрещено использование багов.\n<b>2.4</b> - Запрещено превышать лимит игроков в команде:\n<b>+</b> Нельзя устраивать альянсы или перемирия с другими игроками если в сумме вас больше, чем указано в ограничениях сервера;\n<b>+</b> Частая смена союзников будет считаться за нарушение правил, тоже самое касается и игру с другим игроком пока тиммейт стоит афк или не находится рядом;\n<b>+</b> Запрещена смена союзников на время, если заменяемый союзник продолжит с вами играть;\n<b>+</b> Разрешено сменить напарника, если ваш предыдущий напарник в дальнейшем не будет с вами контактировать.", "Rules_3": "<b>3. Игровой Чат/Голосовой чат</b>\n\n<b>3.1</b> - Запрещено обсуждение политики, религии, аморальных и прочих неуместных тем.\n<b>3.2</b> - Запрещено разжигание национальной, расовой или религиозной ненависти или оскорбления других игроков и других людей.\n<b>3.3</b> - Запрещены ссылки в чате на сторонние сервисы и сайты.\n<b>3.4</b> - Запрещен флуд(многократное повторение бессмысленных фраз, символов) или многократное отправление одинаковых фраз за короткий промежуток времени.\n<b>3.5</b> - Запрещено продавать или делать вид что вы продаёте читы/макросы.\n<b>3.6</b> - Запрещено предлагать сделать действия, приводящие к нежеланному выходу с сервера. К таким действиям относится например нажатие <b>alt+f4</b>, прописывание <b>disconnect</b> в консоль и прочие подобные действия, о значении которых другие игроки могут не знать.\n<b>3.7</b> - Администрация оставляет за собой право выдать мут или заблокировать игрока в чате если тот ведёт себя неадекватно или некорректно по отношению к другим игрокам.\n<b>3.8</b> - Запрещена продажа/покупка игровых ценностей за реальную валюту, крипту или скины.", "Rules_4": "<b>4. Игровая проверка</b>\n\n<b>4.1</b> - Проверки проходят только через программу <b>Discord</b>. Каждый игрок на нашем проекте, в обязательном порядке должен иметь возможность зайти в нее для прохождения проверки.\n<b>4.2</b> - Вызов на проверку осуществляется только через игровое оповещение и ни в коем случае не через голосовой или текстовый чат.\n<b>4.3</b> - Если игрок покинул сервер, проигнорировал проверку или отказался от неё, то он сразу получает блокировку.\n<b>4.4</b> - Запрещено чистить ПК перед проверкой.\n<b>4.5</b> - За отказ показывать нужную для проверки информацию или неадекватное поведение — вы будете заблокированы.\n<b>4.6</b> - Если по итогу(итогом считается и блокировка за отказ / игнор / выход из сервера и предоставление некорректных данных для связи) проверки игрок блокируется, то и вся его команда блокируется вместе с ним.\n\n<b>+</b> Вы имеете полное право отказаться проходить проверку, но в этом случае Вы и ваши союзники будут заблокированы.\n<b>+</b> Так же отказом от проверки будет считаться выход с сервера, предоставление некорректных контактных данных и игнорирование проверки.", "Rules_5": "<b>+</b> Если Вы согласны пройти проверку - то автоматически разрешаете устанавливать сторонние программы нужные администрации для проверки вашего PC(AnyDesk, RCC и т.д).\n\n<b>Возможность разблокировки</b>\nЧерез месяц после блокировки можно подать апелляцию, но, только в случае если бан был получен не за читы или макросы.\nАпелляцию можно подать на нашем сайте.", "Rules_6": "Rules_6", "Rules_7": "Rules_7", "Rules_8": "Rules_8", "Rules_9": "Rules_9", "Rules_10": "Rules_10" }
Note: Each number in the Rules_* means number of page. Page will be ignored if it is blank or contains only page name Rules_*.
Commands:
- rules enable - Enabling Rules agreements. Permission "rules.admin" required.
- rules disable - Disabling Rules agreements. Permission "rules.admin" required.
- rules reask - Reasking all players for the Rules agreement. Permission "rules.admin" required.
Hooks:
-
RulesEnabled:
- Called after the rules are enabled or the plugin is loaded with enabled config.
-
RulesDisabled:
- Called after the rules are disabled or the plugin is unloaded.
-
RulesAccepted:
- Called after the player has accepted the rules;
- Returning a non-null value overrides default behavior.
-
RulesDeclined:
- Called before kicking or banning a player;
- Returning a non-null value overrides default behavior.
void RulesEnabled() { Puts("The rules were enabled!"); } void RulesDisabled() { Puts("The rules were disabled!"); } object RulesAccepted(IPlayer player) { Puts($"Player {player.Name} has accepted the rules!"); return null; } object RulesDeclined(IPlayer player, int declines, int ban_attemps) { Puts($"Player {player.Name} has declined the rules! This is the {declines} declines out of {ban_attemps}!"); return null; }