K4ryuu / CS2_SimpleRanks

A CS2 server extension that allows you to create an unlimited number of ranks with customizable experience thresholds and rank colors. Players gain or lose experience during various in-game events, enabling them to advance or regress between ranks. The extension is fully configurable using 'configs.json' and utilizes MySQL to store data.
GNU General Public License v3.0
27 stars 1 forks source link

Support for resetting points #14

Closed crashzk closed 8 months ago

crashzk commented 8 months ago

It would be interesting to have support for the player and the admin to reset the players' points.

The option for the player to reset their own points would be interesting to include as an option to leave this feature activated or not for them.

And the option to reset the points of all players at once, only access for players with admin.

K4ryuu commented 8 months ago

Hello, I appreciate your feedback. How would you like to determine who is an admin and who is not? By a list of steamids?

In the other hand it is a good idea tho, I can implement that the players could reset their own rank with a confirmation (to avoid trolls to abuse dumber players).

crashzk commented 8 months ago

List of administrators could be a steamid list as mentioned.

Yes, it would be interesting for the player to reset his own rating, but not those of other players, only if he is an administrator could he reset everyone's and such.

I thought of commands like this, for example:

K4ryuu commented 8 months ago

Noted, and I add this feature shortly (within few hours I get back to this project).

K4ryuu commented 8 months ago

The two new commands has been added to the plugin within an alpha release. The alpha release is available at https://github.com/K4ryuu/CS2_SimpleRanks/releases/tag/v1.4.1

The admins are loaded from a file, which is being created on first call of the admin command (if not exists), to the plugins folder of css. I will use this location in my plugins until there is no standard for this. That file (k4ryuu_admins.jsonc), will be listing the admins who are going to have access to the admin commands.

The command targeting is being solved with SteamID64 target currently as good old CS commands in SourcePawn, but I can change that later on if you have a better idea.

The self reset is just nothing extra.