not tested
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <colors>
#pragma semicolon 1
#pragma newdecls required
public void OnPluginStart()
{
HookEvent("player_say", PlayerSay);
}
public void PlayerSay(Handle event, char [] name, bool dontBroadcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid")); //Get the dead clients id
char text[256];
GetEventString(event, "text", text, sizeof(text));
if (StrEqual(text, "!shop") && (GetClientTeam(client) == CS_TEAM_T))
{
for(int i = 1; i <= MaxClients; i++) if (GetClientTeam(i) == CS_TEAM_CT)
CPrintToChat(i, "The Terrorist %N used !shop", client);
}
}
__________________