Raised This Month: $51 Target: $400
 12% 

Solved CSGO - change name to ADMIN


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raj kaul
Senior Member
Join Date: Mar 2018
Location: www.lotgaming.xyz
Old 02-09-2023 , 18:49   CSGO - change name to ADMIN
Reply With Quote #1

hey guys I hope you are doing good
I need a plugin for CSGO If a player joins the server with admin/root access (b or z), his name should be changed to ADMIN.
__________________

Last edited by raj kaul; 02-13-2023 at 23:48.
raj kaul is offline
Naathy
Member
Join Date: Mar 2022
Location: Brazil
Old 02-10-2023 , 03:10   Re: CSGO - change name to ADMIN
Reply With Quote #2

Quote:
Originally Posted by raj kaul View Post
hey guys I hope you are doing good
I need a plugin for CSGO If a player joins the server with admin/root access (b or z), his name should be changed to ADMIN.
PHP Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1
#pragma newdecls required

#define PLUGIN_VERSION "1.0"

public Plugin myinfo 
{
    
name "Staff Nick Changer",
    
author "Nathy",
    
description "Change name of admins to ADMIN",
    
version PLUGIN_VERSION,
    
url "https://steamcommunity.com/id/nathyzinhaa"
};

public 
void OnClientPostAdminCheck(int client)
{
    if(
CheckCommandAccess(client"sm_admin"ADMFLAG_GENERIC))
    {
        
SetClientName(client"ADMIN");
    }

Like this?
__________________
Owner of NGServers

Contact
Discord | Steam | Github
Naathy is offline
raj kaul
Senior Member
Join Date: Mar 2018
Location: www.lotgaming.xyz
Old 02-10-2023 , 03:46   Re: CSGO - change name to ADMIN
Reply With Quote #3

hey Naathy yes i was asking this only
but one more request can we add client real nick also ?
ex - ADMIN - Naathy
__________________
raj kaul is offline
Naathy
Member
Join Date: Mar 2022
Location: Brazil
Old 02-10-2023 , 04:39   Re: CSGO - change name to ADMIN
Reply With Quote #4

Quote:
Originally Posted by raj kaul View Post
hey Naathy yes i was asking this only
but one more request can we add client real nick also ?
ex - ADMIN - Naathy
Here you go:

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

#pragma semicolon 1
#pragma newdecls required

#define PLUGIN_VERSION "1.0"

public Plugin myinfo 
{
    
name "Staff Nick Changer",
    
author "Nathy",
    
description "Set ADMIN Tag As Nickname",
    
version PLUGIN_VERSION,
    
url "https://steamcommunity.com/id/nathyzinhaa"
};

public 
void OnClientPostAdminCheck(int client)
{
    if(
CheckCommandAccess(client"sm_admin"ADMFLAG_GENERIC))
    {
        
char admname[64];
        
char setname[64];
        
        
GetClientName(clientadmnamesizeof(admname));
        
Format(setnamesizeof(setname), "ADMIN - %s"admname);
        
SetClientName(clientsetname);
    }

__________________
Owner of NGServers

Contact
Discord | Steam | Github

Last edited by Naathy; 02-10-2023 at 04:40.
Naathy is offline
raj kaul
Senior Member
Join Date: Mar 2018
Location: www.lotgaming.xyz
Old 02-13-2023 , 23:48   Re: CSGO - change name to ADMIN
Reply With Quote #5

yes working fine Thanks
__________________
raj kaul 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 00:04.


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