Raised This Month: $ Target: $400
 0% 

Solved [CS GO]Admin Chat doesn't display nickname


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 01-30-2023 , 11:44   Re: [CS GO]Admin Chat doesn't display nickname
Reply With Quote #10

By using this character (#), you will able to access to admins private chat

Example: #Hello > (Admin Chat) Mario: Hello

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

public Action OnClientSayCommand(int client, const char[] command, const char[] message)
{
    
int startidx;
    if (
message[startidx] != '#') return Plugin_Continue;
    
    
startidx++;
    if (
strcmp(command"say_team"false) == || strcmp(command"say"false) == 0)
    {
        if (
message[startidx] != '#')
        {
            if (!
CheckCommandAccess(client"sm_say"ADMFLAG_CHAT)) return Plugin_Continue;
            
PrintToAdmins(clientmessage[startidx]);
            return 
Plugin_Stop;
        }
        return 
Plugin_Stop;
    }
    return 
Plugin_Continue;
}

void PrintToAdmins(int client, const char[] sMessage)
{
    for(
int i 1<= MaxClientsi++)
    {
        if (!
IsClientInGame(i) || IsFakeClient(i) || !CheckCommandAccess(i"sm_say"ADMFLAG_CHAT)) continue;
        
PrintToChat(i"(Admin Chat) %N: %s"clientsMessage);
    }

__________________

Last edited by alasfourom; 01-30-2023 at 17:16.
alasfourom is offline
 



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 03:25.


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