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

[REQ] Chat for sertain flags


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vulden
Junior Member
Join Date: Aug 2019
Old 08-29-2019 , 16:31   [REQ] Chat for sertain flags
Reply With Quote #1

Hey does anyone know its possible to add a chat to CSGO with only certain flags who are able to use it? If so I would be happy to know. (Sort of like a admin chat but for different flags?)
Vulden is offline
CowGod
Senior Member
Join Date: Feb 2015
Old 08-31-2019 , 00:25   Re: [REQ] Chat for sertain flags
Reply With Quote #2

you want only players with a certain flag to be able to type in chat?
CowGod is offline
Send a message via Skype™ to CowGod
Vulden
Junior Member
Join Date: Aug 2019
Old 08-31-2019 , 02:42   Re: [REQ] Chat for sertain flags
Reply With Quote #3

No I want like a seperate chat for VIP's like a admin chat.
So they would type !vipmessage <themesssage> for example.
Vulden is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 08-31-2019 , 05:30   Re: [REQ] Chat for sertain flags
Reply With Quote #4

Very possible, and pretty simple. PM me and I'll make it for super cheap.
__________________
ThatOneGuy is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 08-31-2019 , 09:52   Re: [REQ] Chat for sertain flags
Reply With Quote #5

Contact me on discord if you want it for free Pilo#8253
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$

Last edited by Pilo; 08-31-2019 at 09:53.
Pilo is offline
Rohanlogs
Senior Member
Join Date: Nov 2015
Old 08-31-2019 , 10:47   Re: [REQ] Chat for sertain flags
Reply With Quote #6

Quote:
Originally Posted by Pilo View Post
Contact me on discord if you want it for free Pilo#8253
Why don't you just post it here?
__________________
Rohanlogs is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 08-31-2019 , 12:09   Re: [REQ] Chat for sertain flags
Reply With Quote #7

PHP Code:
#include <sourcemod>

public Plugin myinfo 
{
    
name "VIP Chat",
    
author "Pilo",
    
description "",
    
version "1.0",
    
url "https://forums.alliedmods.net/member.php?u=290157"
};

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_vipmessage"Command_VIPMessage);
    
RegConsoleCmd("sm_vm"Command_VIPMessage);
}

public 
Action Command_VIPMessage(int clientint args)
{
    if (
IsClientInGame(client) && !IsFakeClient(client))
    {
        if (
args == 0)
        {
            
PrintToChat(client"Usage : sm_vipmesssage <message>");
            return 
Plugin_Handled;
        }
        if (!
IsVIP(client))
        {
            
PrintToChat(client"Only VIP can access to this command!");
            return 
Plugin_Handled;
        }
        
char arg1[1024];
        
GetCmdArg(1arg1sizeof(arg1));
        
        
SendVIPMessage(clientarg1);
    }
    return 
Plugin_Handled;
}

void SendVIPMessage(int client, const char[] message)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            if (
IsVIP(i))
            {
                
PrintToChat(i" \x04VIP Message\x01 from \x02%N\x01 : %s"clientmessage);
            }
        }
    }
}

stock bool IsVIP(int client)
{
    if (
CheckCommandAccess(client"sm_vip"ADMFLAG_GENERICtrue))
    {
        return 
true;
    }
    return 
false;

I guess this should work, sorry if there is a bug or something because I made it really quickly cause I have to go.
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$
Pilo is offline
Vulden
Junior Member
Join Date: Aug 2019
Old 08-31-2019 , 14:39   Re: [REQ] Chat for sertain flags
Reply With Quote #8

Quote:
Originally Posted by Pilo View Post
PHP Code:
#include <sourcemod>

public Plugin myinfo 
{
    
name "VIP Chat",
    
author "Pilo",
    
description "",
    
version "1.0",
    
url "https://forums.alliedmods.net/member.php?u=290157"
};

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_vipmessage"Command_VIPMessage);
    
RegConsoleCmd("sm_vm"Command_VIPMessage);
}

public 
Action Command_VIPMessage(int clientint args)
{
    if (
IsClientInGame(client) && !IsFakeClient(client))
    {
        if (
args == 0)
        {
            
PrintToChat(client"Usage : sm_vipmesssage <message>");
            return 
Plugin_Handled;
        }
        if (!
IsVIP(client))
        {
            
PrintToChat(client"Only VIP can access to this command!");
            return 
Plugin_Handled;
        }
        
char arg1[1024];
        
GetCmdArg(1arg1sizeof(arg1));
        
        
SendVIPMessage(clientarg1);
    }
    return 
Plugin_Handled;
}

void SendVIPMessage(int client, const char[] message)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            if (
IsVIP(i))
            {
                
PrintToChat(i" \x04VIP Message\x01 from \x02%N\x01 : %s"clientmessage);
            }
        }
    }
}

stock bool IsVIP(int client)
{
    if (
CheckCommandAccess(client"sm_vip"ADMFLAG_GENERICtrue))
    {
        return 
true;
    }
    return 
false;

I guess this should work, sorry if there is a bug or something because I made it really quickly cause I have to go.
Thanks alot is there also a way so I can assign it to sertain flags?
Vulden is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 08-31-2019 , 14:40   Re: [REQ] Chat for sertain flags
Reply With Quote #9

Quote:
Originally Posted by Vulden View Post
Thanks alot is there also a way so I can assign it to sertain flags?
What flag ?
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$
Pilo is offline
I am inevitable
Member
Join Date: May 2019
Location: 0xA6DA34
Old 09-01-2019 , 03:05   Re: [REQ] Chat for sertain flags
Reply With Quote #10

PHP Code:
#include <sourcemod>

#pragma semicolon 1

public void OnPluginStart()
{
    
RegAdminCmd("sm_vm"Cmd_VMADMFLAG_CUSTOM1);
}

public 
Action Cmd_VM(int iClientint iArgs)
{
    if (
iArgs 0)
    {
        
char sMessage[256];
        
        
GetCmdArgString(sMessagesizeof(sMessage));
        
        
StripQuotes(sMessage); // GetCmdArgString creates a pair of quotes, but this is not necessary, because they get removed on PrintToChat iirc.
        
        
for (int i 1<= MaxClientsi++)
            if (
CheckCommandAccess(i"sm_vm"ADMFLAG_CUSTOM1))
                
PrintToChat(isMessage);
    }
    
    return 
Plugin_Handled;

Btw, your version would only send the 1st arg.
__________________
I do make plugins upon requests, so hit me up on discord if you're interested: Stefan Milivojevic#5311

Last edited by I am inevitable; 09-01-2019 at 03:07.
I am inevitable 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 13:06.


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