Raised This Month: $ Target: $400
 0% 

Requst Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
shayan123
BANNED
Join Date: Oct 2020
Location: GB
Old 01-13-2023 , 11:57   Re: Requst Plugin
Reply With Quote #7

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_NAMEPLUGIN_VERSIONPLUGIN_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(rankslinesizeof(line));
            if (
sscanf(line"[%[^]]]"name) == 1) {
                while (!
feof(ranks) && !strstr(line"[")) {
                    
fgets(rankslinesizeof(line));
                    if (
sscanf(line"name = \"%[^\"]\""name) == 1) {
                        
g_ranks 
shayan123 is offline
Send a message via ICQ to shayan123 Send a message via AIM to shayan123 Send a message via Yahoo to shayan123 Send a message via Skype™ to shayan123
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:04.


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