AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   OciXCrom's Rank System [XP|Levels|Ranks] (https://forums.alliedmods.net/showthread.php?t=308540)

OciXCrom 06-24-2018 14:38

OciXCrom's Rank System [XP|Levels|Ranks]
 

Description
  • A fully optimized and easy to use rank system, containing tons of options and an API for creating sub-plugins. Unlike other plugins like this where in order to add/remove or change ranks and the required XP for them, the end-user has to make changes in the .sma file and recompile the plugin, this one does everything through a configuration file that doesn't require any scripting skills nor recompiling the plugin after a change has been made. The plugin has an option to set different XP rewards for different in-game events, such as killing a player, headshot, suicide, teamkill, planting/defusing the bomb and so on. You can even specify different rewards for any weapon in the game.

Information
  • The plugin can be used in a game different than Counter-Strike. Bear in mind that the chat messages won't be colored when using another game.
  • It is also possible to have different settings for different maps. In order to do this, you need to write the map name between dashes on a new line in the configuration file (- de_dust2 -). This will make everything below this line be active only on that specific map. You can also use map prefixes (- de_* -). To go back to global settings, use - #all -.

Commands
  • /xp, /level -- shows your XP amount, level and rank (changeable in the .ini file)
  • /xplist -- opens a menu that shows online players' rank and XP (admins only)
  • /hudinfo -- enables/disables HUD information
  • crxranks_give_xp -- gives/takes XP to/from the player (admins only)
  • crxranks_reset_xp -- resets the player's XP (admins only)

Settings
  • CHAT_PREFIX -- prefix for chat messages
  • SAVE_TYPE -- how to save the XP (nick/IP/SteamID)
  • SAVE_INTERVAL -- when to save the XP (on disconnect/death/round end/XP update)
  • USE_MYSQL -- if set to 1, the plugin will use MySQL to save the XP, otherwise it will use nVault
  • SQL_HOST -- SQL address for use with MySQL
  • SQL_USER -- SQL user for use with MySQL
  • SQL_PASSWORD -- SQL password for use with MySQL
  • SQL_DATABASE -- SQL database for use with MySQL
  • SQL_TABLE -- SQL table for use with MySQL
  • VAULT_NAME -- name of the vault file where the XP is saved when using nVault
  • XP_COMMANDS -- commands that allow you to check your XP
  • LEVELUP_MESSAGE_TYPE -- who will see the message when a player reaches a new level
  • LEVELUP_SOUND -- sound when a player gains a level
  • LEVELUP_SCREEN_FADE_ENABLED -- whether the screen fade effect when a player gains a level will be active
  • LEVELUP_SCREEN_FADE_COLOR -- color for the screen fade effect when gaining a level
  • LEVELDN_SOUND -- sound when a player loses a level
  • LEVELDN_SCREEN_FADE_ENABLED -- whether the screen fade effect when a player loses a level will be active
  • LEVELDN_SCREEN_FADE_COLOR -- color for the screen fade effect when losing a level
  • FINAL_LEVEL_FLAGS -- here you can specify admin flags that players will receive when they reach the final level
  • VIP_FLAGS -- players with these flags are considered VIP and can be set to receive more XP than regular players
  • USE_COMBINED_EVENTS -- whether the plugin will use combined XP rewards for specific events
  • TEAM_LOCK -- if non-zero, only players that are in thee team set here will be able to receive XP
  • MINIMUM_PLAYERS -- if greater than 0, players won't be able to receive XP if there are less than X players in the server
  • NOTIFY_ON_KILL -- if enabled, player will receive chat notifications about the XP they receive when killing a player, as well as when committing suicide if the plugin is set to take XP on suicide
  • HUDINFO_ENABLED -- whether the HUD info that shows your XP will be enabled
  • HUDINFO_VISIBILITY -- who and when is able to see the HUD info
  • HUDINFO_TEAM_LOCK -- if the TEAM_LOCK option is enabled and this one is set to 1, players won't be able to see the HUD info if they're not on the team set in TEAM_LOCK, the same applies for the player they're spectating
  • HUDINFO_OTHER_PLAYERS -- whether players will be able to see the HUD info of the player they're spectating while dead
  • HUDINFO_COLOR -- color for the HUD info
  • HUDINFO_POSITION -- coordinates for the HUD info for alive players
  • HUDINFO_POSITION_DEAD -- coordinates for the HUD info for dead players
  • HUDINFO_USE_DHUD -- whether the HUD info will use a DHUD message
  • HUDINFO_FORMAT -- how the HUD info is going to look when the player is on any level except the last one
  • HUDINFO_FORMAT_FINAL -- how the HUD info is going to look when the player is on the last level
  • HUDINFO_INVALID_TEXT -- what is the HUD info going to display when an invalid value is given
  • XP_NOTIFIER_ENABLED -- whether the plugin will show a separate HUD message when gaining/losing XP
  • XP_NOTIFIER_COLOR_GET -- color for the XP notifier when gaining XP
  • XP_NOTIFIER_COLOR_LOSE -- color for the XP notifier when losing XP
  • XP_NOTIFIER_POSITION -- coordinates for the XP notifier
  • XP_NOTIFIER_DURATION -- duration of the XP notifier
  • XP_NOTIFIER_USE_DHUD -- whether the XP notifier will use a DHUD message

Configuring the ranks
  • The ranks can be easily configured in the [Ranks] section in the .ini file.
  • As you can see from the default ranks set in the file, each rank is added on a new line by writing its name and the required XP for it separated with the "=" symbol.
  • The first rank must start from 0 XP.
  • The number of ranks you can add is unlimited.
  • The name of the ranks can't start with any of these symbols: "#", ";", "-" and "["

Configuring the XP rewards
  • Unlike other plugins where there is a separate setting for each way of earning XP, this plugin has things set up quite differently and it's much easier to use.
  • In the [XP Rewards] section you can configure all kinds of XP rewards depending on special keywords.
  • For example, if you want players to receive 5 XP on a normal kill, you simply need to write "kill = 5" on a new line in the section, since the keyword "kill" tells the plugin that this reward should be given when you kill a player. For a kill with a headshot, simply use the keyword "headshot", and so on.
  • You can even add a separate reward for each weapon in a game, e.g. "awp = 10".
  • In order to make VIP users receive different amount of XP than the regular players, for example 10 XP for planting the bomb, while regular players receive 7 XP, you should write "bomb_planted = 7 10".
  • Take a look at this link for all keywords available in the plugin.

Showing the ranks in chat
  • Since this plugin mainly refers to XP, levels and ranks, and not the chat itself, it is necessary to download a separate plugin for the chat in order to show the ranks in it. Use the Chat Manager plugin for that purpose.
  • I have added support in Chat Manager for this plugin, so you can easily activate the ranks in it.
  • In order to activate them, you need to add the keyword $rank$ in the [Format Definition] section in the plugin's configuration file. You can make the ranks show only for regular players, along with the admin prefix, etc.
  • If you don't know how and where to add it, follow these steps:
    • Open the configuration file - configs/ChatManager.ini.
    • Find the [Format Definitions] section and replace the 4 settings inside it with these ones:

      PHP Code:

      format_admin $dead_prefix$ &x04[$rank$] $admin_prefix$ &x03$custom_name$ &x01$chat_color$$message$
      format_admin_team $dead_prefix$ ($team$) &x04[$rank$] $admin_prefix$ &x03$custom_name$ &x01$chat_color$$message$
      format_player $dead_prefix$ &x04[$rank$] &x03$custom_name$ &x01$chat_color$$message$
      format_player_team $dead_prefix$ ($team$) &x04[$rank$] &x03$custom_name$ &x01$chat_color$$message

    • If you don't want the rank to be displayed for the admins who already have an admin prefix, replace only the last two settings and leave the first ones unchanged.

Credits
  • Huehue for help with making the SQL part of the plugin.

Additional information and download link

https://raw.githubusercontent.com/Oc...using_this.png
https://raw.githubusercontent.com/Oc...plugin_lab.png
https://raw.githubusercontent.com/Oc...ad_default.png

Rivotril 06-24-2018 14:47

Re: OciXCrom's Rank System
 
Looks pretty good

tarsisd2 06-24-2018 14:59

Re: OciXCrom's Rank System
 
looks great!

that picture of rank system XP list, shouldn't it be in order, biggest xp in first and so on?

WhiteFang1319 06-24-2018 15:07

Re: OciXCrom's Rank System
 
A ranking system with many configurable options and that too by OciXCrom, looks great

OciXCrom 06-24-2018 15:08

Re: OciXCrom's Rank System
 
Thanks for the nice comments.

Quote:

Originally Posted by tarsisd2 (Post 2599118)
looks great!

that picture of rank system XP list, shouldn't it be in order, biggest xp in first and so on?

I was thinking the same after I saw it. :)
I'll probably edit it later (after I actually find out how to use the sorting functions after all this time).

tarsisd2 06-24-2018 15:22

Re: OciXCrom's Rank System
 
Brazillian Portuguese [bp]

RankSystem.txt
PHP Code:

[bp]
CRXRANKS_RANKINFO_NORMAL Voce tem &x04%i/%i XP&x01Seu rank &x04#%i&x01: &x03%s&x01. Proximo rank: &x03%s&x01.
CRXRANKS_RANKINFO_FINAL Voce tem &x04%i XP&x01Seu rank &x04#%i&x01: &x03%s&x01. Voce esta no ultimo level!
CRXRANKS_GIVE_XP = &x03%&x01perdeu &x04%i XP &x01para &x03%s
CRXRANKS_TAKE_XP 
= &x03%&x01tomou &x04%i XP &x01de &x03%s
CRXRANKS_RESET_XP 
= &x03%&x01resetou &x03%s&x01's XP
CRXRANKS_LEVEL_REACHED = &x03%s &x01subiu para o&x04Level %i &x01[&x03%s&x01]
CRXRANKS_LEVEL_LOST = &x03%s &x01voltou para o &x04Level %i &x01[&x03%s&x01]
CRXRANKS_MENU_TITLE = \rOciXCrom'
\ySistema de Rank: \rLista de XP
CRXRANKS_ITEM_FORMAT 
= \d[%i XP] \w%\r[\yLevel %i: %s\r]
CRXRANKS_XP_NOTIFIER_GET = +%i XP
CRXRANKS_XP_NOTIFIER_LOSE 
= -%i XP 

RankSystemNoColors.txt
PHP Code:

[bp]
CRXRANKS_RANKINFO_NORMAL Voce tem %i/%i XPSeu rank #%i: %s. proximo rank: %s.
CRXRANKS_RANKINFO_FINAL Voce tem %i XPSeu rank #%i: %s. Voce esta no ultimo level!
CRXRANKS_GIVE_XP = %s perdeu %i XP para %s
CRXRANKS_TAKE_XP 
= %s tomou %i XP de %s
CRXRANKS_RESET_XP 
= %s resetou %s's XP
CRXRANKS_LEVEL_REACHED = %s subiu para o Level%i [%s]
CRXRANKS_LEVEL_LOST = %s voltou para o level Level %i [%s]
CRXRANKS_MENU_TITLE = \rOciXCrom'
\ySistema de Rank: \rLista de XP
CRXRANKS_ITEM_FORMAT 
= \d[%i XP] \w%\r[\yLevel %i: %s\r]
CRXRANKS_XP_NOTIFIER_GET = +%i XP
CRXRANKS_XP_NOTIFIER_LOSE 
= -%i XP 


DevilBoy.eXe 06-24-2018 17:04

Re: OciXCrom's Rank System
 
As always, OciXCrom makes the best plugins :D
Code:

[ro] -- DevilBoy.eXe
CRXRANKS_RANKINFO_NORMAL = Ai &x04%i/%i XP&x01. Rangul tau este &x04#%i&x01: &x03%s&x01. Urmatorul rang: &x03%s&x01.
CRXRANKS_RANKINFO_FINAL = Ai &x04%i XP&x01. Rangul tau este &x04#%i&x01: &x03%s&x01. Ai ajung la ultimul nivel!
CRXRANKS_GIVE_XP = &x03%s &x01a dat &x04%i XP &x01lui &x03%s
CRXRANKS_TAKE_XP = &x03%s &x01a luat &x04%i XP &x01de la &x03%s
CRXRANKS_RESET_XP = &x03%s &x01ia resetat XP-u lui &x03%s&x01
CRXRANKS_LEVEL_REACHED = &x03%s &x01a ajuns la &x04Nivelul %i &x01[&x03%s&x01]
CRXRANKS_LEVEL_LOST = &x03%s &x01a ajuns inapoi la &x04Nivelul %i &x01[&x03%s&x01]
CRXRANKS_MENU_TITLE = \rOciXCrom's \yRang System: \rLista XP
CRXRANKS_ITEM_FORMAT = \d[%i XP] \w%s \r[\yNivel %i: %s\r]
CRXRANKS_XP_NOTIFIER_GET = +%i XP
CRXRANKS_XP_NOTIFIER_LOSE = -%i XP


SHIELD755 06-24-2018 21:03

Re: OciXCrom's Rank System
 
Awesome I have tested :)

OciXCrom 06-25-2018 08:11

Re: OciXCrom's Rank System
 
The translations have been added. Thanks.

Fuck For Fun 06-25-2018 12:09

Re: OciXCrom's Rank System
 
GJ, I Like it =]

EDIT:
I think it is unnecessary to add a Tag Rank
3: 0 EXP - Test Player?
- Recommended for server - surf? public?


All times are GMT -4. The time now is 22:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.