Hello i trying edit plugin Admin Chat because then plug doesn't display nick so The plugin uses the message as %s and I don't know how to do it because the username also uses %s, I don't know how I can explain it Sorry if anyone doesn't understand
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_AdminMessage, ADMFLAG_SLAY, "The admin talk command");
}
public Action Command_AdminMessage(int client, int args)
{
char name[MAX_NAME_LENGTH];
GetClientName(client, name, sizeof(name));
{
if(args < 1)
{
PrintToConsole(client, "Usage: sm_at <message>");
return Plugin_Handled;
}
char Message[32];
GetCmdArgString(Message, sizeof(Message));
PrintToChatAll (" \x07[ADMIN]\x10%s: \x09", Message);
return Plugin_Handled;
}
}
Orginal Plugin :
https://forums.alliedmods.net/showthread.php?t=310137