Jump to content

Custom Status Framework 1.0.10

   (1 review)

1 Screenshot

  • 5,488
  • 776
  • 32.39 kB

About Custom Status Framework

This plugin does not introduce any functionality by itself, but rather provides a framework for other plugins to manipulate the status list that appears in the game UI on the right.


Developer API

Check out this demo for a code example of how to use the API for this plugin.

Note for developers: when possible, avoid using dynamic statuses, as they are a significant performance draw. If possible, instead manually update statuses when appropriate.

	// API Documentation for Custom Status Framework v1.0.5

	// Returns a list of all statuses for a player, both vanilla and custom ones.
        List<string> GetStatusList
        (
            BasePlayer basePlayer
        )
          
        // Returns true if a player has a status matching the given id.
        bool HasStatus
        (
            BasePlayer basePlayer, 
            string id
        )
          
        // Method for showing a simple temporary status to a player.
        // This status will appear and then disappear after some time.
        void ShowStatus
        (
            BasePlayer basePlayer, 
            string id, 
            string color = null, 
            string text = null, 
            string textColor = null, 
            string subText = null, 
            string subTextColor = null, 
            string imageLibraryIconId = null, 
            string iconColor = null, 
            float seconds = 4f
        )
          
        // Creates a status for the given player.
        private void SetStatus
        (
            BasePlayer basePlayer, 
            string id, 
            string color, 
            string text, 
            string textColor, 
            string subText, 
            string subTextColor, 
            string imageLibraryIconId, 
            string iconColor
        )
          
        // Removes the specified status from the given player.
        private void ClearStatus
        (
            BasePlayer basePlayer, 
            string id
        )

        // Performs a ClearStatus and then a SetStatus.
        // Useful if you want to simply refresh a status value.
        private void UpdateStatus
        (
            BasePlayer basePlayer, 
            string id, string color, 
            string text, 
            string textColor, 
            string subText, 
            string subTextColor, 
            string imageLibraryIconId,
            string iconColor
        )

        // Creates a global status with a static value.
        // The value of this status will not change, but will be dynamically applied to all
        // players who meet the specified condition function.
        private void CreateStatus
        (
            string id, 
            string color, 
            string text, 
            string textColor, 
            string subText, 
            string subTextColor, 
            string imageLibraryIconId, 
            string iconColor, 
            Func<BasePlayer, bool> condition
        )
          
        // Creates a global status with a dynamic value.
        // The value of this status will change, and is dynamically set for each player
        // based on the return of the dynamicValue function.
        // This status will be dynamically applied to all players who meet the specified
        // condition function.
        private void CreateDynamicStatus
        (
            string id, 
            string color, 
            string text, 
            string textColor, 
            string subTextColor, 
            string imageLibraryIconId, 
            string iconColor, 
            Func<BasePlayer, bool> condition, 
            Func<BasePlayer, string> dynamicValue
        )
          
        // Deletes a global status by id.
        private void DeleteStatus
        (
            string id
        )

 

  • Like 3
  • Love 2

Mr01sam's Collection

User Feedback

648.2k

Downloads

Total number of downloads.

3.6k

Customers

Total customers served.

48.2k

Files Sold

Total number of files sold.

866.8k

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.