PLUGIN - CS2-RanksPoints

Spatiul dedicat dezvoltatorilor. Aici gasesti resurse pentru CounterStrikeSharp, ajutor pentru cod si scripting avansat.
Post Reply
User avatar
greenie
Full Member
Full Member
Posts: 2389
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Da

PLUGIN - CS2-RanksPoints

Post by greenie »

EN
To facilitate easier assistance, I have created a dedicated Discord server. You can join it using the following link: https://discord.gg/XjfUGMdCgn

The plugin was developed inspired by the [Levels Ranks] plugins and borrows most of its functions as well as the database. This means that the RanksPoints plugin can be integrated with LrWeb or GameCMS similar to [Levels Ranks]. During development, there was no opportunity to fully test the plugin, so there may be errors in its operation. If you find any issues, please report them for correction.

RanksPoints
The RanksPoints system is based on a simple principle: players perform various actions in the game, as a result of which they either gain or lose experience points. Achieving or losing a certain amount of these points leads to obtaining a corresponding rank. The number of available ranks can be configured and edited as desired.

Installation
Install Metamod:Source and CounterStrikeSharp

Download RankPoints.

Unzip the archive and upload it to your game server.

Start the server to create the necessary configuration files.

Connect the plugin to the database by entering the required data in the dbconfig.json file. Make sure the entered data is correct.

Main Configuration (Config.yml)
# Configuration file for RankPoints

# Number of awarded points
# Points for Kill - the number of points added to a player for killing an opponent.
PointsForKill: 5
# Points for Death - the number of points subtracted from a player for dying.
PointsForDeath: -5
# Points for Assist - the number of points added to a player for assisting in a kill.
PointsForAssist: 1
# Points for Suicide - the number of points subtracted from a player for committing suicide.
PointsForSuicide: -6
# Points for Headshot - additional points for a headshot kill.
PointsForHeadshot: 1
# Points per Round Win - the number of points added to a player for their team winning a round.
PointsPerRoundWin: 2
# Points per Round Loss - the number of points subtracted from a player for their team losing a round.
PointsPerRoundLoss: -2
# Points for MVP - the number of points added to a player for earning the MVP title of a round.
PointsPerMVP: 3
# Points for NoScope AWP Kill - additional points for killing without using the AWP scope.
PointsForNoScopeAWP: 1
# Points for Bomb Defusal
PointsForBombDefusal: 2
# Points for Bomb Exploded
PointsForBombExploded: 2
# Points for Bomb Planting - the number of points added to a player for successfully planting the bomb.
PointsForBombPlanting: 2
# Points for Bomb Dropping - the number of points subtracted from a player for dropping the bomb.
PointsForBombDropping: -2
# Points for Bomb Pickup - the number of points added to a player for picking up the bomb.
PointsForBombPickup: 1
# Points for Wallbang - the number of points added to a player for getting a kill through a wall.
PointsForWallbang: 3
# Points for Hostage Follows
PointsForHostageFollows: 2
# Points for Hostage Stops Following
PointsForHostageStopsFollowing: -2
# Points for Hostage Rescued
PointsForHostageRescued: 4
# Points for Kill Through Smoke - the number of points added to a player for killing an enemy through a smoke screen.
PointsForKillThroughSmoke: 3
# Points for Blind Kill - the number of points added to a player for getting a kill while blinded.
PointsForBlindKill: 5

# RanksPoints Parameters
# Displaying clan tags for ranks of players. true - enabled, false - disabled.
EnableClanTags: True
# Minimum number of players for experience gain - players only earn experience if this number of players is on the server.
GetActivePlayerCountMsg: "[ {Yellow}RanksPoints {White}] A minimum of {Red}{MIN_PLAYERS} {White}players is required for experience gain."
MinPlayersForExperience: 4
# Enabling or disabling bonus experience for special nicknames.
EnableSpecialNicknameBonus: true
# Experience multiplier for special nicknames.
BonusMultiplierForSpecialNickname: 1.5
# String to search for in the nickname to apply the multiplier.
SpecialNicknameContains: "example.com"
# Enabling or disabling awarding points for bot kills. true - enabled, false - disabled.
GivePointsForBotKills: False

# All RanksPoints Messages
# Messages for experience gain
PointsChangeMessage: "[ {Yellow}RanksPoints{White} ] Your experience: {COLOR} {POINTS} [{SIGN}{CHANGE_POINTS} for {REASON}]"
# Events
SuicideMessage: "suicide"
SuicideMessageColor: "{Red}"
DeathMessage: "death"
DeathMessageColor: "{Red}"
KillMessage: "kill"
KillMessageColor: "{Green}"
NoScopeAWPMessage: "AWP kill without scope"
NoScopeAWPMessageColor: "{Blue}"
HeadshotMessage: "headshot"
HeadshotMessageColor: "{Yellow}"
AssistMessage: "assist"
AssistMessageColor: "{Blue}"
RoundWinMessage: "round win"
RoundWinMessageColor: "{Green}"
RoundLossMessage: "round loss"
RoundLossMessageColor: "{Red}"
MVPMessage: "MVP"
MVPMessageColor: "{Gold}"
BombDefusalMessage: "bomb defusal"
BombDefusalMessageColor: "{Green}"
BombExplodedMessage: "bomb exploded"
BombExplodedMessageColor: "{Green}"
BombPlantingMessage: "bomb planting"
BombPlantingMessageColor: "{Green}"
BombDroppingMessage: "bomb dropping"
BombDroppingMessageColor: "{Red}"
BombPickupMessage: "bomb pickup"
BombPickupMessageColor: "{Green}"
WallbangMessage: "wallbang"
WallbangMessageColor: "{Purple}"
HostageFollowsMessage: "hostage follows"
HostageFollowsMessageColor: "{Green}"
HostageStopsFollowingMessage: "hostage stops following"
HostageStopsFollowingMessageColor: "{Red}"
HostageRescuedMessage: "hostage rescued"
HostageRescuedMessageColor: "{Blue}"
KillThroughSmokeMessage: "убийство через дым"
KillThroughSmokeMessageColor: "{Green}"
BlindKillMessage: "убийство в состоянии ослепления"
BlindKillMessageColor: "{Yellow}"

# Rank Up Message.
RankUpMessage: Your rank has been upgraded to {RANK_NAME}!
# Rank Down Message.
RankDownMessage: Your rank has been downgraded to {RANK_NAME}.

# !rank
RankCommandMessage : "[ {Yellow}RanksPoints {White}] Rank: {Green}{RANK_NAME} {White}| Position: {Blue}{PLACE}/{TOTAL_PLAYERS} {White}| Experience: {Gold}{POINTS} {White}| Kills: {Green}{KILLS} {White}| Deaths: {Red}{DEATHS} {White}| KDR: {Yellow}{KDR} {White}| Server Time: {Gold}{PLAY_TIME}"
TimeFormat: "{0}d {1}h {2}min"
# Enabling or disabling the !rank command
IsRankCommandEnabled: true

# !top
TopCommandIntroMessage : "[ {Blue}Top Players{White} ]"
TopCommandPlayerMessage: "{INDEX}. {Grey}{NAME} - {White}{RANK} {Grey}- {Blue}{POINTS} points"
TopCommandNoDataMessage: "[ {Red}Error{White} ] No data available for top players."
TopCommandErrorMessage: "[ {Red}Error{White} ] An error occurred while executing the command."
# Enabling or disabling the !top command
IsTopCommandEnabled: true

# !topkills
TopKillsCommandIntroMessage: "[ {Green}Top Killers{White} ]"
TopKillsCommandPlayerMessage: "{INDEX}. {Grey}{NAME} - {Green}{KILLS} kills{White}"
TopKillsCommandNoDataMessage: "[ {Red}Error{White} ] No data available for top killers."
TopKillsCommandErrorMessage: "[ {Red}Error{White} ] An error occurred while executing the command."
# Enabling or disabling the !topkills command
IsTopkillsCommandEnabled: true

# !topdeaths
TopDeathsCommandIntroMessage: "[ {Red}Top Deaths{White} ]"
TopDeathsCommandPlayerMessage: "{INDEX}. {Grey}{NAME}{White} - {Red}{DEATHS} deaths{White}"
TopDeathsCommandNoDataMessage: "[ {Red}Error{White} ] No data available for top deaths."
TopDeathsCommandErrorMessage: "[ {Red}Error{White} ] An error occurred while executing the command."
# Enabling or disabling the !topdeaths command
IsTopdeathsCommandEnabled: true

# !topkdr
TopKDRCommandIntroMessage: "[ {Yellow}Top KDR{White} ]"
TopKDRCommandPlayerMessage: "{INDEX}. {Grey}{NAME}{White} - {Yellow}KDR: {KDR}"
TopKDRCommandNoDataMessage: "[ {Red}Error{White} ] No data available for top KDR."
TopKDRCommandErrorMessage: "[ {Red}Error{White} ] An error occurred while executing the command."
# Enabling or disabling the !topkdr command
IsTopkdrCommandEnabled: true

# !toptime
TopTimeCommandIntroMessage: "[ {Gold}Top Playtime{White} ]"
TopTimeCommandPlayerMessage: "{INDEX}. {Grey}{NAME} - {Gold}{TIME}{White}"
TopTimeCommandNoDataMessage : "[ {Red}Error{White} ] No data available for top playtime."
TopTimeCommandErrorMessage: "[ {Red}Error{White} ] An error occurred while executing the command."
TopTimeFormat: "{0}d {1}h {2}min"
# Enabling or disabling the !toptime command
IsToptimeCommandEnabled: true

# !resetstats
ResetStatsCooldownMessage: "[ {Red}RanksPoints {White}] You can only reset your stats once every 3 hours."
ResetStatsSuccessMessage: "[ {Yellow}RanksPoints {White}] Your stats have been reset."
ResetStatsCooldownHours: "3"
# Enabling or disabling the !resetstats command
IsResetstatsCommandEnabled: true

# !ranks
RanksCommandIntroMessage: "[ {Gold}Rank List{White} ]"
RanksCommandRankMessage: "{NAME} - {Green}{EXPERIENCE} experience{White}"
RanksCommandNoDataMessage: "[ {Red}Error{White} ] No data available for ranks."
RanksCommandErrorMessage: "[ {Red}Error{White} ] An error occurred while executing the command."
# Enabling or disabling the !ranks command
IsRanksCommandEnabled: true

# !lvl
LvlCommandIntroMessage: "[ {Gold}Available Commands{White} ]"
RankCommandDescription: "- {Green}!rank {White}- Shows your current rank and stats"
TopCommandDescription: "- {Green}!top {White}- Shows the top 10 players by points"
TopKillsCommandDescription: "- {Green}!topkills {White}- Shows the top 10 players by kills"
TopDeathsCommandDescription: "- {Green}!topdeaths {White}- Shows the top 10 players by deaths"
TopKDRCommandDescription: "- {Green}!topkdr {White}- Shows the top 10 players by KDR"
TopTimeCommandDescription: "- {Green}!toptime {White}- Shows the top 10 players by playtime"
ResetStatsCommandDescription: "- {Green}!resetstats {White}- Reset your stats (can be used once every 3 hours)"
RanksCommandDescription: "- {Green}!ranks {White}- Shows a list of all ranks and the required experience to achieve them"
TagRankCommandDescription: "- {Green}!tagrank {White}- Enables or disables displaying your clan tag"
# Enabling or disabling the !lvl command
IsLvlCommandEnabled: true

# !tagrank
TagRankEnabledMessage: "[ {Yellow}RanksPoints {White}] Your clan tag will be displayed again starting from the next round."
TagRankDisabledMessage: "[ {Yellow}RanksPoints {White}] Your clan tag will no longer be displayed starting from the next round."
# Enabling or disabling the !tagrank command
IsTagRankCommandEnabled: true
Rank Configuration (settings_ranks.yml)
- id: 0
name: Silver - I
minExperience: 0
clanTag: '[Silver - I]'
- id: 1
name: Silver - II
minExperience: 10
clanTag: '[Silver - II]'
- id: 2
name: Silver - III
minExperience: 25
clanTag: '[Silver - III]'
- id: 3
name: Silver - IV
minExperience: 50
clanTag: '[Silver - IV]'
- id: 4
name: Silver Elite
minExperience: 75
clanTag: '[Silver Elite]'
- id: 5
name: Silver - Master Guardian
minExperience: 100
clanTag: '[Silver - MG]'
- id: 6
name: Gold Star - I
minExperience: 150
clanTag: '[Gold Star - I]'
- id: 7
name: Gold Star - II
minExperience: 200
clanTag: '[Gold Star - II]'
- id: 8
name: Gold Star - III
minExperience: 300
clanTag: '[Gold Star - III]'
- id: 9
name: Gold Star - Master
minExperience: 500
clanTag: '[Gold Star - M]'
- id: 10
name: Master Guardian - I
minExperience: 750
clanTag: '[Master Guardian - I]'
- id: 11
name: Master Guardian - II
minExperience: 1000
clanTag: '[Master Guardian - II]'
- id: 12
name: Master Guardian Elite
minExperience: 1500
clanTag: '[Master Guardian Elite]'
- id: 13
name: Distinguished Master Guardian
minExperience: 2000
clanTag: '[Distinguished MG]'
- id: 14
name: Legendary Eagle
minExperience: 3000
clanTag: '[Legendary Eagle]'
- id: 15
name: Legendary Eagle Master
minExperience: 5000
clanTag: '[Legendary Eagle M]'
- id: 16
name: Supreme Master First Class
minExperience: 7500
clanTag: '[Supreme M-FC]'
- id: 17
name: Global Elite
minExperience: 10000
clanTag: '[Global Elite]'
https://github.com/ABKAM2023/CS2-RanksP ... s/main.zip
𝑴𝒂𝒚𝒃𝒆 𝒕𝒉𝒆 𝑬𝒂𝒓𝒕𝒉 𝒊𝒔 𝒕𝒉𝒆 𝑯𝒆𝒍𝒍 𝒐𝒇 𝑨𝒏𝒐𝒕𝒉𝒆𝒓 𝑷𝒍𝒂𝒏𝒆𝒕... ☢️
Post Reply

Return to “Scripting CS2”