Jump to content
Message added by IIIaKa,

If you purchase any of my plugins that work with AdvancedStatus, you'll receive AdvancedStatus for free!
P.S. On every plugin page, there is a Bundle. The price is the same, but in addition, you will receive AdvancedStatus.

Message added by IIIaKa,

For developers whose plugins are compatible with AdvancedStatus, I can provide a permanent coupon with a 50% discount. This way, you can incorporate 50% of the AdvancedStatus cost into your plugin's price and offer AdvancedStatus as a complimentary gift.

7 Screenshots

  • 7.1k
  • 293
  • 37.05 kB
 Share

About Advanced Status

Useful auxiliary plugin that allows other plugins to customize the status bar through an API.

Note: AdvancedStatus does not display any bars on its own. This is done by other plugins that work with it.

An example plugin demonstrating interaction with AdvancedStatus.

P.S. If you're using Vanish from umod, you need to replace with this: Vanish.cs

 

Ji0XU4D.png

  • The ability to specify the frequency of calculating the number of bars;
  • 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 abillity to set own image and customize the color of the image;
  • The abillity to set sprite instead of the image;
  • The ability to specify custom text. Additionally, customization options for the color, size, and font of the text;
  • No need to pass all parameters;
  • No need to manually delete your bar when unloading your plugin.

 

MOEpxmo.png

{
  "Frequency(in ms) for calculating the number of bars. For example, 500 means 2 times per second, 300 approximately 3 times per second.": 500,
  "Update interval of the bar state in seconds for invisible players": 0.5,
  "UI. Bar - Left to Right": true,
  "UI. Bar - Offset Between": 2,
  "UI. Bar - Default Height": 26,
  "UI. Main - Default Color": "#505F75",
  "UI. Main - Default Transparency": 0.7,
  "UI. Main - Default Material(empty to disable)": "",
  "UI. Image - Default Color": "#6B7E95",
  "UI. Text - Default Size": 12,
  "UI. Text - Default Color": "#FFFFFF",
  "UI. Text - Default Font(https://umod.org/guides/rust/basic-concepts-of-gui#fonts)": "RobotoCondensed-Bold.ttf",
  "UI. SubText - Default Size": 12,
  "UI. SubText - Default Color": "#FFFFFF",
  "UI. SubText - Default Font(https://umod.org/guides/rust/basic-concepts-of-gui#fonts)": "RobotoCondensed-Bold.ttf",
  "UI. Progress - Default Color": "#89B840",
  "UI. Progress - Default Transparency": 0.7,
  "UI. Progress - Default OffsetMin": "25 2.5",
  "UI. Progress - Default OffsetMax": "-2.5 -2.5",
  "Version": {
    "Major": 0,
    "Minor": 1,
    "Patch": 12
  }
}

Note: Default values will be used if the external plugin does not pass the property itself.

 

DxI83SK.png

EN:
{
  "MsgDays": "d",
  "MsgHours": "h",
  "MsgMinutes": "m",
  "MsgSeconds": "s",
  "MsgLessThanOneMinute": "< 1m"
}
RU:
{
  "MsgDays": "д",
  "MsgHours": "ч",
  "MsgMinutes": "м",
  "MsgSeconds": "с",
  "MsgLessThanOneMinute": "< 1м"
}

 

l9x1AEn.png

  • OnPlayerGainedBuildingPrivilege:
    • Called after the player enters their building privilege.
  • OnPlayerLostBuildingPrivilege:
    • Called after the player exits their building privilege.

 

void OnPlayerGainedBuildingPrivilege(BasePlayer player)
{
  Puts($"{player.displayName} entered the authorized building privilege zone.");
}

void OnPlayerLostBuildingPrivilege(BasePlayer player)
{
  Puts($"{player.displayName} exited the authorized building privilege zone.");
}

 

bLFQCAu.png

There are 5 methods:

  • CreateBar
  • DeleteBar
  • DeleteAllBars
  • BarExists
  • InBuildingPrivilege 

 

There are 4 types of bar:

  • Default - A simple bar that displays the provided information. Does not update the value of SubText by itself;
  • Timed - Similar to the default bar, but it automatically disappears after the specified time in the TimeStamp parameter;
  • TimeCounter - The SubText shows the remaining time until TimeStamp. Also automatically removed upon expiration of the TimeStamp;
  • ProgressBar - Similar to the default bar, but additionally features a progress bar.

 

CreateBar:

Used to create a bar or update bar values for a player.

To call the CreateBar method, you need to pass 2 parameters. The first one is BasePlayer or <ulong>playerID. The second one is a dictionary with the parameters you need.

In the CreateBar method, all parameters are optional, except for two:

  • Id;
  • Plugin.

Parameters not specified when creating a new bar will use the values set in the AdvancedStatus plugin's configuration file.

Parameters not specified during bar update will retain the values they had before the update.

Note: The plugin does not update values automatically, you need to manually send new values.

var parameters = new Dictionary<string, object>
{
  { "Id", "MyID" },								//<string>Unique identifier for the bar in your plugin. ***This is a required field.
  { "BarType", "Default" },							//<string>Type of the bar. There are 5 types: Default, Timed, TimeCounter, ProgressBar and TimedProgressBar.
  { "Plugin", Name },								//<string>Name of your plugin. ***This is a required field.
  { "Order", 10 },								//<int>The position of your bar relative to others. Order is determined by increasing values(ASC).
  { "Height", 26 },								//<int>The height of your bar. A standard bar is 26 pixels.
  { "Main_Color", "#505F75" },							//<string>HTML Hex color of the bar background.
  { "Main_Transparency", 0.7f },						//<float>Transparency of the bar background.
  { "Main_Material", "assets/content/ui/uibackgroundblur.mat" },		//<string>Material of the bar background(empty to disable).
  { "Image", "MySuperIcon" },							//<string>Name of the image saved in the ImageLibrary or a direct link to the image if ImageLibrary is not used.
  { "Image_Sprite", "assets/icons/gear.png" },					//<string>The name of the sprite to be used as the image. Empty to use the URL("Image").
  { "Is_RawImage", false },							//<bool>Which type of image will be used? True - CuiRawImageComponent. False - CuiImageComponent.
  { "Image_Color", "#6B7E95" },							//<string>HTML Hex color of the bar image.
  { "Text", "MyText" },								//<string>Main text.
  { "Text_Size", 12 },								//<int>Size of the main text.
  { "Text_Color", "#FFFFFF" },							//<string>HTML Hex color of the main text.
  { "Text_Font", "RobotoCondensed-Bold.ttf" },					//<string>Font of the main text.
  { "SubText", "MyText" },							//<string>Sub text.
  { "SubText_Size", 12 },							//<int>Size of the sub text.
  { "SubText_Color", "#FFFFFF" },						//<string>HTML Hex color of the sub text.
  { "SubText_Font", "RobotoCondensed-Bold.ttf" },				//<string>Font of the sub text.
  { "TimeStamp", DateTimeOffset.UtcNow.AddSeconds(6).ToUnixTimeSeconds() },	//<double>Used if the bar type is Timed, TimeCounter or TimedProgressBar.
  { "Progress", (float)amount / 100f },						//<float>Progress. From 0.0 to 1.0.
  { "Progress_Color", "#89B840" },						//<string>Progress color.
  { "Progress_Transparency", 1f },						//<float>Progress transparency.
  { "Progress_OffsetMin", "25 2.5" },						//<string>Progress OffsetMin: "*left* *bottom*".
  { "Progress_OffsetMax", "-2.5 -2.5" }						//<string>Progress OffsetMax: "*right* *top*".
};

AdvancedStatus?.Call("CreateBar", player, parameters);				//Calling the CreateBar method with the passing of BasePlayer/playerID and a dictionary containing the required parameters.

 

DeleteBar:

Used to remove the bar for a player.

To call the DeleteBar method, you need to pass 3 parameters. The first one is BasePlayer or <ulong>playerID. The second one is Id of your bar. And the third one is name of your plugin.

AdvancedStatus?.Call("DeleteBar", player, barID, Name);//Calling the DeleteBar method with the passing of BasePlayer/playerID, ID of the bar and name of your plugin.

If you try to delete a bar that doesn't exist, nothing bad will happen. So feel free to delete the bar without checking its existence.

P.S. When unloading your plugin, there is no need to manually delete bars for players, AdvancedStatus will handle it automatically.

 

DeleteAllBars:

Used to remove all bars associated with the plugin.

To call the DeleteAllBars method, you need to pass only 1 parameter. It is name of your plugin.

AdvancedStatus?.Call("DeleteAllBars", Name);//Calling the DeleteAllBars method, passing the name of your plugin

 

BarExists:

Used to check if the specified bar exists.

To call the BarExists method, you need to pass 3 parameters. The first one is BasePlayer or <ulong>playerID. The second one is Id of your bar. And the third one is name of your plugin.

(bool)AdvancedStatus?.Call("BarExists", player, barID, Name);//Calling the BarExists method with the passing of BasePlayer/playerID, ID of the bar and name of your plugin.

 

InBuildingPrivilege:

Used to check if the player has authorized building privileges.

To call the InBuildingPrivilege method, you need to pass  BasePlayer or <ulong>playerID.

(bool)AdvancedStatus?.Call("InBuildingPrivilege", player, false);//Checking if the player has Building Privilege.

 

  • Like 1

User Feedback

1m

Downloads

Total number of downloads.

5.4k

Customers

Total customers served.

76.4k

Files Sold

Total number of files sold.

1.5m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.