You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
714 B

/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <tf2>
public Plugin:myinfo =
{
name = "SpecChat",
author = "Chefe",
description = "<- Description ->",
version = "1.0",
url = "<- URL ->"
}
public OnPluginStart()
{
HookEvent("player_chat", Event_PlayerChat, EventHookMode_Pre);
}
public Action:Event_PlayerChat(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (GetClientTeam(client) == _:TFTeam_Spectator)
{
new String:saidtext[255];
GetEventString(event, "text", saidtext, sizeof(saidtext));
PrintToChatAll("(SPEC) %s", saidtext);
return Plugin_Handled;
}
return Plugin_Continue;
}