inital commit
This commit is contained in:
34
specchat.sp
Normal file
34
specchat.sp
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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;
|
||||
}
|
Reference in New Issue
Block a user