08-26-2014, 22:05
02-02-2015, 12:59
Maybe someone come in handy
C# Code:
C# Code:
Code:
using Addon;
using System;
using System.Collections.Generic;
namespace Headshot
{
public class Headshot : CPlugin
{
public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage, string DamageMod, HitLocations HitLocation)
{
//if survival make headshot he get 50 ammo to primary weapon
if (Attacker.Team == Teams.Allies && HitLocation == HitLocations.Head && Victim.Team == Teams.Axis && Damage >= Victim.Other.Health)
{
//Your code for getting points/ammo
//Example:
Attacker.Ammo.PrimaryAmmo += 50;
}
return Damage;
}
}
}