Hi everyone!
At first sorry for my bad english, i'm swiss.
I would like to release this little plugin i made for my server.
I made it because i hate hitmarkers with the snipers
You can set a list of weapons that will never do hitmarkers, it will always kill the victim.
Add those lines to the sv_config.ini:
Plugin Csharp source code:
I'm open for every suggestions or comments.
Have Fun!
At first sorry for my bad english, i'm swiss.
I would like to release this little plugin i made for my server.
I made it because i hate hitmarkers with the snipers

You can set a list of weapons that will never do hitmarkers, it will always kill the victim.
Add those lines to the sv_config.ini:
Code:
[AntiHitMarkers]
Enabled=1
// 0 or 1
Weapon_list=iw5_msr iw5_l96a1
// Weapons list separated by 1 spacePlugin Csharp source code:
Code:
using System;
using Addon;
namespace AntiHitMarkers
{
public class AntiHitMarkers : CPlugin
{
// List of weapons without hitmarkers
private string[] weapon_list;
// Status of the plugin
private string enabled = "0";
public override void OnServerLoad()
{
// Get the status of the plugin
enabled = GetServerCFG("AntiHitMarkers", "Enabled", "no_weapon");
// If the plugin is enabled
if (enabled == "1")
{
// Get the list of antihitmarkers weapons
string get_weapon_list = GetServerCFG("AntiHitMarkers", "Weapon_list", "no_weapon");
// Split the list by spaces to get an array
weapon_list = get_weapon_list.Split(' ');
}
// Print plugin loaded
ServerPrint("Plugin AntiHitMarkers loaded! (enabled => " + enabled + ")");
}
public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, String Weapon, int Damage)
{
// If the plugin is enabled
if (enabled == "1")
{
// Loop the weapons list
foreach (string weapon_name in weapon_list)
{
// Control if the weapon is in the weapons list
if (Weapon.Contains(weapon_name))
{
// If damage is lower than the victim's health
if (Damage < Victim.Other.Health)
{
// Set the damage equal to the victim's health
Damage = Victim.Other.Health;
}
// Stop the foreach
break;
}
}
}
// Return the final damage
return Damage;
}
}
}I'm open for every suggestions or comments.
Have Fun!


![[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]](http://roflsaurus.com/users/public/r212360a129ce9b84444093b6cd2699013a1fbn155.png)


![[Image: epvp71up3.png]](http://www.abload.de/img/epvp71up3.png)