PHP Code:
#include <sourcemod>
#pragma semicolon 1
#pragma newdecls required
public void OnPluginStart()
{
RegAdminCmd("sm_at", Command_AdminMessage, ADMFLAG_GENERIC, "The admin talk command");
}
Action Command_AdminMessage(int client, int args)
{
if(args < 1)
{
ReplyToCommand(client, "[SM] Usage: sm_at <message>");
return Plugin_Handled;
}
char sMessage[512];
GetCmdArgString(sMessage, sizeof(sMessage));
PrintToChatAll ("\x07[ADMIN] \x10%N: \x09%s", client, sMessage);
return Plugin_Handled;
}
__________________