Hi,
Im not interested in getting a approve for any plugin, accept it or not so I post it here.
(There is one warning about that I dont care
)
PHP Code:
#pragma semicolon 1
#include <sourcemod>
new UserMsg:p_Msg;
public Plugin:myinfo =
{
name = "[CS:GO] No Player Saved msg",
author = "TheWho",
description = "No Player Saved msg",
version = "1.0",
url = "http://www.sourcemod.net"
}
public OnPluginStart()
{
p_Msg = GetUserMessageId("TextMsg");
HookUserMessage(p_Msg, pBlockSaveMsg, true);
}
public Action:pBlockSaveMsg(UserMsg:msg_id, Handle:pb, const players[], playersNum, bool:reliable, bool:init)
{
if (!reliable)
return Plugin_Continue;
decl String:message[256];
PbReadRepeatedString(pb, "params", 0, message, 256);
if (StrContains(message, "#Chat_SavePlayer_Saved") != -1)
{
return Plugin_Handled;
}
else if (StrContains(message, "#Chat_SavePlayer_Savior") != -1)
{
return Plugin_Handled;
}
else if (StrContains(message, "#Chat_SavePlayer_Spectator") != -1)
{
return Plugin_Handled;
}
else
return Plugin_Continue;
}
Credits goes to
Protobuf, Barcadi and me for finding the Strings only.
__
Maybe you can say me why
PHP Code:
if (StrContains(message, "save") != -1)
doesn't work in this case o.O