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

[CS:GO] Admin Talk


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
Trum
AlliedModders Donor
Join Date: Jan 2017
Old 08-20-2018 , 09:33   [CS:GO] Admin Talk
Reply With Quote #1

Description:
With this plugin you can send a message from "[ADMIN]", its simpel but useful sometimes!



Installation:

1. Drag admin_talk.smx into addons/sourcemod/plugins
2. Chage map or restart server
3. Type "/at <message>" to send a message



Commands:

sm_at <message>



Pictures:

http://prntscr.com/kksq2b


Quote:
Can i change "[ADMIN]:"?

Yeah you could do it, just change PrintToChatAll (" \x07[ADMIN]: \x09%s", Message); to whatever you like!

Code:

PHP Code:
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "Trum | Trum#7913"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>
#include <sdktools>

#pragma newdecls required

public Plugin myinfo = {
    
name "[CSGO] Admin Talk",
    
author "Trum | Trum#7913",
    
description "Custom chat message for admins",
    
url "http://discord.me/trum",
};

public 
void OnPluginStart()
{
    
RegAdminCmd("sm_at"Command_AdminMessageADMFLAG_SLAY"The admin talk command");
}

public 
Action Command_AdminMessage(int clientint args)
{
    if(
args 1)
    {
        
PrintToConsole(client"Usage: sm_at <message>");
        return 
Plugin_Handled;
    }

    
char Message[32];

    
GetCmdArgString(Messagesizeof(Message));
    
PrintToChatAll (" \x07[ADMIN]: \x09%s"Message);

    return 
Plugin_Handled;



If you have any questions or trouble with the plugin you can add me or discord or join my discord!

Username: Trum#7913
Discord server: http://discord.me/trum
Attached Files
File Type: sp Get Plugin or Get Source (admin_talk.sp - 448 views - 860 Bytes)
File Type: smx admin_talk.smx (4.3 KB, 161 views)
Trum is offline
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 08-20-2018 , 10:24   Re: [CS:GO] Admin Talk
Reply With Quote #2

Wrong section.

Here's the version with Config-File btw.

PHP Code:
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "Trum | Trum#7913"
#define PLUGIN_VERSION "1.0"

#include <sourcemod>
#include <sdktools>

#pragma newdecls required

ConVar g_ChatTag;

public 
Plugin myinfo = {
    
name "[CSGO] Admin Talk",
    
author PLUGIN_AUTHOR,
    
description "Custom chat message for admins",
    
version PLUGIN_VERSION,
    
url "http://discord.me/trum"
};

public 
void OnPluginStart() {
    
RegAdminCmd("sm_at"Command_AdminMessageADMFLAG_SLAY"The admin talk command");
    
g_ChatTag CreateConVar("sm_chattag""[ADMIN]""Chat tag for players");
    
    
AutoExecConfig(true"admin_talk");
}

public 
Action Command_AdminMessage(int clientint args) { 
    if(
args 1) {
        
PrintToConsole(client"Usage: sm_at <message>");
        return 
Plugin_Handled;
    }
    
    
char sTag[32];
    
g_ChatTag.GetString(sTagsizeof(sTag));
    
PrintToChat(client"%s:"sTag);

    
char Message[32];

    
GetCmdArgString(Messagesizeof(Message));
    
PrintToChatAll (" \x07[ADMIN]: \x09%s"Message);

    return 
Plugin_Handled;

__________________
If you need any help, feel free to add me on Steam.



Last edited by Triniayo; 08-20-2018 at 10:38.
Triniayo is offline
Send a message via Skype™ to Triniayo
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-21-2018 , 08:43   Re: [CS:GO] Admin Talk
Reply With Quote #3

As a plugin developer, you should know that CS:GO uses SourceMod, not AMX Mod X.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Trum
AlliedModders Donor
Join Date: Jan 2017
Old 08-21-2018 , 13:03   Re: [CS:GO] Admin Talk
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
As a plugin developer, you should know that CS:GO uses SourceMod, not AMX Mod X.
Where did i say anything about AMX Mod X.?
Trum is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-21-2018 , 13:10   Re: [CS:GO] Admin Talk
Reply With Quote #5

Look at the full section name.

PS: uploading compiled plugins is not allowed either.
__________________

Last edited by OciXCrom; 08-21-2018 at 13:11.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Trum
AlliedModders Donor
Join Date: Jan 2017
Old 08-22-2018 , 06:41   Re: [CS:GO] Admin Talk
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
Look at the full section name.

PS: uploading compiled plugins is not allowed either.
So i should only upload the .sp?
Trum is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-22-2018 , 07:41   Re: [CS:GO] Admin Talk
Reply With Quote #7

Yes, the site automatically generates a download button for the .smx file.
__________________

Last edited by OciXCrom; 08-22-2018 at 07:42.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Trum
AlliedModders Donor
Join Date: Jan 2017
Old 08-24-2018 , 10:41   Re: [CS:GO] Admin Talk
Reply With Quote #8

Quote:
Originally Posted by OciXCrom View Post
Yes, the site automatically generates a download button for the .smx file.
Thanks
Trum is offline
Reply


Thread Tools
Display Modes

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 02:32.


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