Jump to content

6 Screenshots

About This File


Compile both plugins. Then put them in addons.


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:

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.


[INC] CromChat - a better ColorChat!


---------- [ Description ] ----------

Since every colorchat include that I used so far had something that I don't like, I decided to make one my self and fix the things that annoy me. For example, I didn't like using RED/BLUE/TEAM_COLOR as a parameter in the ColorChat include, another include displayed an error when sending a message in an empty server, and so on. So, here's my version.

---------- [ Color Codes ] ----------

Beside the default symbols - ^x04, ^x03 & ^x01, you can also use these ones:

&x07 = red
&x06 = blue
&x05 = white
&x04 = green
&x03 = team color
&x01 = normal
&x00 = removes message prefix (only if put in the beginning of the message)

You can use only one of the following in a single message: &x07, &x06, &x05, &x03. If you use more than one in a message, it will automatically select the color that is first in the list and will replace all other colors with that one. Combining more than one team color is not possible in CS 1.6!!!

You can choose from multiple color code groups by adding a single line in the .sma file. You can see all the different groups on the image below. By default, the CROMCHAT group is used.

To activate a different color group, simply add #define CC_COLORS_TYPE CC_COLORS_<group name> before #include <cromchat>. Example: if you want to activate the group SHORT, the code needs to look like this:

#include <cromchat> 

Bear in mind that the codes from the group STANDARD cannot be used lang, .ini and other files. They are only available in the .sma file, so don't use this group if the plugin uses multiple files.

You can also make your own custom set of codes, by using the group CUSTOM like this:

#define CC_SYM_CHAT_NORMAL         "&x01"
#define CC_SYM_CHAT_TEAM         "&x03"
#define CC_SYM_CHAT_GREEN         "&x04"
#define CC_SYM_CHAT_WHITE         "&x05"
#define CC_SYM_CHAT_BLUE         "&x06"
#define CC_SYM_CHAT_RED         "&x07"
#define CC_SYM_CHAT_NOPREF         "&x00"
#include <cromchat> 

In the code you replace the &x0 with whatever you want.

---------- [ Sending Messages ] ----------

Messages are sent using the function CC_SendMessage or CromChat:

CC_SendMessage(id, szMessage[], any:...) 

With the function CC_LogMessage you can send a chat message and log it at the same time:

// This will send a message to "id" and log it in the default log file.
CC_LogMessage(id, _, "&x04green &x01is not &x07red")

// This will send a message to all players and log it in the file "test.txt".
CC_LogMessage(0, "test.txt", "&x03Cooool story bro!") 

You can use CC_SendMatched to send a message that obeys the targeted player's team color. You can also use ColorChat or client_print_color:

CC_SendMatched(const id, const iPlayer, const szInput[], any:...) 

Where iPlayer is the player that will be used as a target for the team color. Instead of a player, you can also add one of the following color codes: CC_COLOR_TEAM, CC_COLOR_GREY, CC_COLOR_BLUE, CC_COLOR_RED.

CC_SendMatched(id, iTarget, "message")
CC_SendMatched(0, CC_COLOR_GREY, "message" 

It is also possible to send a message to a specific group of players by using the same flags as the get_players function. To do this, use the function CC_GroupMessage. The example below shows how to send a message to all alive terrorists.

CC_GroupMessage("ae", "TERRORIST", "message") 

The library also contains a function to send a message to all players who have specified admin flags. This is the function CC_SendAdminMessage.

CC_SendAdminMessage("abcei", true, "message") 

If the second argument is set to true, the message will be sent to all players who have ALL of the specified admin flags, otherwise, if it's set to false, it will be sent to players who have ANY of the specified admin flags.

CromChat also has functions that can replace the show_activity functions that are used within the default AMXX plugins. By default, when you write #include <cromchat> in your plugin, all "activity" functions automatically get replaced with the corresponding functions from cromchat, which allows you to easily replace the messages from the default AMXX plugins with colored ones. If you want to disable the automatic transformation of these functions, simply add #define CC_DONT_OVERWRITE_ACTIVITY before #include <cromchat>.

---------- [ Adding A Prefix ] ----------

With the function CC_SetPrefix you can specify a global prefix that will automatically be added in the beginning of each message. This is much more easier than having to add a prefix manually on each line of code. The function needs to be added in plugin_init() (or some other forward if necessary).

public plugin_init()

If you want to remove the prefix, you can use the function CC_RemovePrefix.

---------- [ Removing Colors ] ----------

To remove the color codes from a message:

CC_RemoveColors(szMessage[], iLen, bool:bChat = true, bool:bMenu = false) 

If bChat = true, it will remove the codes for chat colors.
If bMenu = true, it will remove the codes for menu colors.

What's New in Version 10/22/2020 02:21 PM   See changelog


No changelog available for this version.

  • Like 1

User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.


Welcome back, Guest

Here you can customize this templates as you wish!

Color Customizations

Background Customizations

  • Create New...