About Promo Status
The plugin allows displaying promo codes in the status bar. Depends on AdvancedStatus plugin.
- The ability to display promo codes in the status bar;
- The ability to specify the order of the bar;
- The ability to change the height of the bar;
- The abillity to customize the color and transparency of the background;
- The ability to set a material for the background;
- The ability to switch between CuiRawImageComponent and CuiImageComponent for the image;
- The ability to get images from the local folder(*SERVER*\oxide\data\AdvancedStatus\Images);
- The abillity to set own image and customize the color and transparency of the image;
- The abillity to set sprite instead of the image;
- The ability to customize the color, size and font of the text.
- promostatus.admin - Provides the ability to admin commands.
{
"Chat command": "promo",
"Is it worth enabling GameTips for messages?": true,
"Default time in seconds for displaying the promo code in the status bar. A value of 0 will keep the bar visible until the promo code expires": 600.0,
"Status. Bar - Height": 26,
"Status. Bar - Order": 20,
"Status. Background - Color(Hex or RGBA)": "#FFD33A",
"Status. Background - Transparency": 0.7,
"Status. Background - Material(empty to disable)": "",
"Status. Image - Url": "https://i.imgur.com/q15Cmu5.png",
"Status. Image - Local(Leave empty to use Image_Url)": "PromoStatus_Promo",
"Status. Image - Sprite(Leave empty to use Image_Local or Image_Url)": "",
"Status. Image - Is raw image": false,
"Status. Image - Color(Hex or RGBA)": "#FFD33A",
"Status. Image - Transparency": 1.0,
"Status. Image Outline - Is it worth enabling an outline for the image?": false,
"Status. Image Outline - Color(Hex or RGBA)": "0.1 0.3 0.8 0.9",
"Status. Image Outline - Transparency": 1.0,
"Status. Image Outline - Distance": "0.75 0.75",
"Status. Text - Size": 12,
"Status. Text - Color(Hex or RGBA)": "#FFFFFF",
"Status. Text - Font(https://umod.org/guides/rust/basic-concepts-of-gui#fonts)": "RobotoCondensed-Bold.ttf",
"Status. Text - Offset Horizontal": 0,
"Status. Text Outline - Is it worth enabling an outline for the text?": false,
"Status. Text Outline - Color(Hex or RGBA)": "#000000",
"Status. Text Outline - Transparency": 1.0,
"Status. Text Outline - Distance": "0.75 0.75",
"Status. SubText - Size": 12,
"Status. SubText - Color(Hex or RGBA)": "#FFFFFF",
"Status. SubText - Font": "RobotoCondensed-Bold.ttf",
"Status. SubText Outline - Is it worth enabling an outline for the sub text?": false,
"Status. SubText Outline - Color(Hex or RGBA)": "0.5 0.6 0.7 0.5",
"Status. SubText Outline - Transparency": 1.0,
"Status. SubText Outline - Distance": "0.75 0.75",
"List of promo codes. Note: Dates should be in UTC(yyyy-MM-dd HH:mm). Example: 2025-01-25 13:00": {},
"Version": {
"Major": 0,
"Minor": 1,
"Patch": 3
}
}
EN:
{
"MsgStatusText": "PROMO CODE:",
"MsgNotAllowed": "You do not have permissions to use this command!",
"MsgWrongCommand": "You entered an incorrect command!\nExample: /{0} toggle",
"MsgWrongArguments": "You have not provided enough arguments for this command!",
"MsgPromoNotFound": "Promo code {0} not found!",
"MsgAddFailed": "Failed to add promo code. Invalid format or expiration date is earlier than the current date.\nExample: /{1} add \"{0}\" \"{2}\" \"{3}\"(optional)",
"MsgPromoAdded": "Promo code {0} has been successfully added. Valid until {1}.",
"MsgPromoUpdated": "Promo code {0} has been successfully updated. Valid until {1}.",
"MsgPromoRemoved": "Promo code {0} has been successfully removed!",
"MsgDisplayFailed": "Failed to update promo code display time.\nExample: /{1} display \"{0}\" 600",
"MsgDisplayUpdated": "A new display time({1} sec) has been set in the status bar for promo code {0}.",
"MsgBarEnabled": "Displaying the promo bar is enabled!",
"MsgBarDisabled": "Displaying the promo bar is disabled!",
"MsgPromoEmpty": "No available promo codes!",
"MsgPromoList": "List of available promo codes(UTC):\n{0}"
}
RU:
{
"MsgStatusText": "ПРОМОКОД:",
"MsgNotAllowed": "У вас недостаточно прав для использования этой команды!",
"MsgWrongCommand": "Вы ввели не правильную команду!\nПример: /{0} toggle",
"MsgWrongArguments": "Вы ввели не достаточно аргументов для этой команды!",
"MsgPromoNotFound": "Промокод {0} не найден!",
"MsgAddFailed": "Не удалось добавить промокод. Не верный формат, либо дата истечения меньше текущей даты.\nПример: /{1} add \"{0}\" \"{2}\" \"{3}\"(опционально)",
"MsgPromoAdded": "Промокод {0} был успешно добавлен. Действителен до {1}.",
"MsgPromoUpdated": "Промокод {0} был успешно обновлен. Действителен до {1}.",
"MsgPromoRemoved": "Промокод {0} был успешно удален!",
"MsgDisplayFailed": "Не удалось обновить время отображения промокода.\nПример: /{1} display \"{0}\" 600",
"MsgDisplayUpdated": "Установлено новое время({1} сек) отображения в статус баре для промокода {0}.",
"MsgBarEnabled": "Отображение промо баров включено!",
"MsgBarDisabled": "Отображение промо баров выключено!",
"MsgPromoEmpty": "Нет доступных промокодов!",
"MsgPromoList": "Список доступных промокодов(UTC):\n{0}"
}
- bar - personal toggle for displaying promo status bars;
- all - displays a list of all active promo codes in the chat. Admins also see inactive ones;
- add *code* *expireDate* *startDate*(optional) - adds a new promo code. Permission "promostatus.admin" required;
- remove *code* - removes a promo code. Permission "promostatus.admin" required;
- display *code* *seconds* - changes the display time(in seconds) of the promo code for each player. Permission "promostatus.admin" required.
Example:
- /promo bar
- /promo all
- /promo add "test" "2024-12-23 14:06"
- /promo display "test" 360
There are 2 hooks that the plugin is subscribed to:
- OnPromoCodeAdded
- OnPromoCodeRemoved
OnPromoCodeAdded:
Used to add a new promo code.
To call the OnPromoCodeAdded hook, you need to pass 3 parameters, 1 of which is optional:
- <string>promoCode - The promo code;
- <DateTime>expireDate - The expiration date;
- <DateTime>startDate - Optional. The start date of validity.
Interface.CallHook("OnPromoCodeAdded", "*Your promo*", expireDate, startDate);//Calling the OnPromoCodeAdded hook to add a new promo code.
OnPromoCodeRemoved:
Used to remove a promo code.
To call the OnPromoCodeRemoved hook, you need to pass 1 parameter:
- <string>promoCode - The promo code.
Interface.CallHook("OnPromoCodeRemoved", "*Your promo*");//Calling the OnPromoCodeRemoved hook to remove a promo code.