Changes on sm_*say
This commit is contained in:
parent
453001ae9c
commit
7ed4e88915
@ -34,6 +34,7 @@
|
||||
#pragma semicolon 1
|
||||
|
||||
#include <sourcemod>
|
||||
#include <basecomm>
|
||||
|
||||
#pragma newdecls required
|
||||
|
||||
@ -80,6 +81,9 @@ public void OnPluginStart()
|
||||
|
||||
public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs)
|
||||
{
|
||||
if (client <= 0 || BaseComm_IsClientGagged(client))
|
||||
return Plugin_Continue;
|
||||
|
||||
int startidx;
|
||||
if (sArgs[startidx] != CHAT_SYMBOL)
|
||||
return Plugin_Continue;
|
||||
@ -88,24 +92,7 @@ public Action OnClientSayCommand(int client, const char[] command, const char[]
|
||||
|
||||
if (strcmp(command, "say", false) == 0)
|
||||
{
|
||||
if (sArgs[startidx] != CHAT_SYMBOL) // sm_say alias
|
||||
{
|
||||
if (!CheckCommandAccess(client, "sm_say", ADMFLAG_CHAT))
|
||||
{
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
SendChatToAll(client, sArgs[startidx]);
|
||||
LogAction(client, -1, "\"%L\" triggered sm_say (text %s)", client, sArgs[startidx]);
|
||||
|
||||
return Plugin_Stop;
|
||||
}
|
||||
|
||||
startidx++;
|
||||
|
||||
if (sArgs[startidx] != CHAT_SYMBOL) // sm_psay alias
|
||||
{
|
||||
if (!CheckCommandAccess(client, "sm_psay", ADMFLAG_CHAT))
|
||||
if (!CheckCommandAccess(client, "sm_psay_chat", ADMFLAG_CHAT))
|
||||
{
|
||||
return Plugin_Continue;
|
||||
}
|
||||
@ -122,20 +109,6 @@ public Action OnClientSayCommand(int client, const char[] command, const char[]
|
||||
|
||||
return Plugin_Stop;
|
||||
}
|
||||
|
||||
startidx++;
|
||||
|
||||
// sm_csay alias
|
||||
if (!CheckCommandAccess(client, "sm_csay", ADMFLAG_CHAT))
|
||||
{
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
DisplayCenterTextToAll(client, sArgs[startidx]);
|
||||
LogAction(client, -1, "\"%L\" triggered sm_csay (text %s)", client, sArgs[startidx]);
|
||||
|
||||
return Plugin_Stop;
|
||||
}
|
||||
else if (strcmp(command, "say_team", false) == 0 || strcmp(command, "say_squad", false) == 0)
|
||||
{
|
||||
if (!CheckCommandAccess(client, "sm_chat", ADMFLAG_CHAT) && !g_Cvar_Chatmode.BoolValue)
|
||||
|
Loading…
Reference in New Issue
Block a user