Raised This Month: $32 Target: $400
 8% 

[NMRIH] Admin/VIP tag on nickname


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xeloximira
Junior Member
Join Date: Apr 2017
Old 07-23-2018 , 16:53   [NMRIH] Admin/VIP tag on nickname
Reply With Quote #1

Hi!

I would like to know if there is some way to get this plugin working on a No More Room in Hell server.

I've been searching for this plugin for a long time, without any success.

My programming skills are very limited :s

Thank you!
__________________

xeloximira is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-23-2018 , 18:26   Re: [NMRIH] Admin/VIP tag on nickname
Reply With Quote #2

What is No More Room in Hell, and the pluign you've linked works?
mug1wara is offline
xeloximira
Junior Member
Join Date: Apr 2017
Old 07-23-2018 , 19:41   Re: [NMRIH] Admin/VIP tag on nickname
Reply With Quote #3

No More Room in Hell is a mod of Half Life 2.

The plugin that I've linked doesn't work on NMRIH, apparently because it uses cstrike includes.

Quote:
#include <sourcemod>
#include <cstrike>

public Plugin:myinfo =
{
name = "AdminTag",
description = "Private plugin",
author = "KeepCalm",
version = "2.0",
url = ""
};
Just for an example, this plugin does something similar, and WORKS on NMRIH.
xeloximira is offline
poachedegg
Junior Member
Join Date: Nov 2018
Location: China
Old 11-18-2018 , 10:58   Re: [NMRIH] Admin/VIP tag on nickname
Reply With Quote #4

Like [Root]xeloximira, [Admin]xeloximira, [Vip]xeloximira?

PHP Code:
#include<sourcemod> 
#include<sdktools> 

public void OnClientPostAdminCheck(int Client

    if(!
IsFakeClient(Client))
    {
        
char NewName[128]; 
        
GetClientName(ClientNewNamesizeof(NewName)); 
        
bool TagFlag false
        
        if (
GetUserFlagBits(Client) & ADMFLAG_ROOT)  
        { 
            if(
StrContains(NewName"[ROOT]") == -1
            { 
                
Format(NewNamesizeof(NewName), "[ROOT]%N"Client); 
                
TagFlag true
            } 
        } 
        else if (
GetUserFlagBits(Client) & ADMFLAG_GENERIC)        //maybe other flag, up to you 
        

            if(
StrContains(NewName"[ADMIN]") == -1
            { 
                
Format(NewNamesizeof(NewName), "[ADMIN]%N"Client); 
                
TagFlag true
            } 
        } 
        else if (
GetUserFlagBits(Client) & ADMFLAG_RESERVATION)        //maybe other flag, up to you 
        

            if(
StrContains(NewName"[VIP]") == -1
            { 
                
Format(NewNamesizeof(NewName), "[VIP]%N"Client); 
                
TagFlag true
            } 
        } 
        else 
        { 
            if(
StrContains(NewName"[GUEST]") == -1
            { 
                
Format(NewNamesizeof(NewName), "[GUEST]%N"Client); 
                
TagFlag true
            } 
        }
         
        if(
TagFlag)
        { 
            
SetClientInfo(Client"name"NewName);
        }
    }


Last edited by poachedegg; 11-18-2018 at 20:57. Reason: Avoid multiple tags
poachedegg is offline
Reply



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 06:00.


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