Compile this:
PHP Code:
#include <sourcemod>
public OnPluginStart()
{
new UserMsg:MsgMessage = GetUserMessageId("PZDmgMsg");
HookUserMessage(MsgMessage, OnPZDmgMsg, true);
}
//Fires anytime a kill, protect, heal, damage x5 message is called (i Guess)
public Action:OnPZDmgMsg(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init)
{
//Read Message
new iMsgType = BfReadByte(bf); //This is the message type id: 12 = Pounce Damage 9 = <player> hit <player> x2 message
new iAttackerUserId = BfReadShort(bf); //Userid of the attacker or the healer, etc.
new iVictimUserId = BfReadShort(bf); //Userid of the victim / target
BfReadShort(bf); //Unknown
new iDamage = BfReadShort(bf); //Damage done.
//Print the info to server, uncomment to check
PrintToServer("PZDmg Sent: T:%i | A:%i | V:%i | D:%i", iMsgType, iAttackerUserId, iVictimUserId, iDamage);
return Plugin_Continue;
}
Ok now, every time that kind of messages of friendly-fire, damage x4, <player> killed <player> the message PZDmg is sent. The message can be blocked using return Plugin_Handled. However, if you block this message directly, absolutelly nothing will be sent to players and all messages (linked to this) will be blocked. You only need to block 3 type of messages, so, go to your empty server, check the server console and start doing friendly fire, or kill someone.
The server will print, for example, something like this:
Code:
PZDemg Sent: T:12 | A:1 | V:3 | D:0
"T" would be the message id, this is what you want to block the specific message. When you obtain this value, add the following code you the previous one, remove the "PrintToServer" line and everyone is happy. Suppose the id is 8:
Code:
if(iMsgType == 8)
{
return Plugin_Handled;
}
Thats all. If you dont understand i cant really help you anymore, i dont have the time to get all the message ids.