OnPointsUpdated(ulong userID, int amount)Suggestion

Hello, could you please add the OnPointsUpdated hook, which will be called upon the update of points?

Something like this:

private void OnPointsUpdated(ulong userID, int amount)

Line 1800:

private object AddPoints(object userID, int amount)
        {
            ulong ID;
            object success = GetUserID(userID);
            if (success is bool)
                return false;
            else ID = (ulong)success;

            if (!playerRP.ContainsKey(ID))
                playerRP.Add(ID, amount);
            else playerRP[ID] += amount;

            if (configData.Options.Logs)
            {
                string message = string.Empty;
                BasePlayer player = BasePlayer.FindByID(ID);
                if (player != null)
                    message = $"{ID} - {player.displayName} has been given {amount}x RP";
                else message = $"(offline){ID} has been given {amount}x RP";

                LogToFile($"Earnings", $"[{DateTime.Now.ToString("hh:mm:ss")}] {message}", this);
            }
            Interface.CallHook("OnPointsUpdated", ID, playerRP[ID]);//Like this
            return true;
        }

        private object TakePoints(object userID, int amount, string item = "")
        {
            ulong ID;
            object success = GetUserID(userID);
            if (success is bool)
                return false;
            else ID = (ulong)success;

            if (!playerRP.ContainsKey(ID)) return null;
            playerRP[ID] -= amount;

            if (configData.Options.Logs)
            {
                string message = string.Empty;
                BasePlayer player = BasePlayer.FindByID(ID);
                if (player != null)
                    message = $"{ID} - {player.displayName} has spent {amount}x RP{(string.IsNullOrEmpty(item) ? string.Empty : $" on: {item}")}";
                else message = $"(offline){ID} has spent {amount}x RP";

                LogToFile($"SpentRP", $"[{DateTime.Now.ToString("hh:mm:ss")}] {message}", this);
            }
            Interface.CallHook("OnPointsUpdated", ID, playerRP[ID]);//Like this
            return true;
        }

Still waiting for this hooks...

Could someone from the moderators/admins please approve the patch 0.4.77-OnPointsUpdated? It seems that k1lly0u is no longer active here. This request has been pending for over half a year without a response.

On lines 1822 and 1847, I added the following code(below) before "return true;"

Interface.CallHook("OnPointsUpdated", ID, playerRP[ID]);

Thank you!