First, you will need to create a new .ini file where you can define the player's name, SteamID, or IP, and the tag you want to display above their head.
You can use the following format:
HTML Code:
[player1]
name = "player1"
tag = "ADMIN"
[player2]
steamid = "STEAM_0:1:123456"
tag = "VIP"
You can also use IP instead of name or steamid.
Next, you will need to create the plugin itself. Here's an example of how you can create a plugin that reads the .ini file and displays the tag above the player's head:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <reapi>
#define PLUGIN_NAME "Rank Tags"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "YourName"
new g_ranks[33];
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
// Read the ranks from the .ini file
new File:ranks = fopen("ranks.ini", "rt");
if (ranks) {
new name[32], steamid[32], ip[32], tag[32], line[256];
while (!feof(ranks)) {
fgets(ranks, line, sizeof(line));
if (sscanf(line, "[%[^]]]", name) == 1) {
while (!feof(ranks) && !strstr(line, "[")) {
fgets(ranks, line, sizeof(line));
if (sscanf(line, "name = \"%[^\"]\"", name) == 1) {
g_ranks