• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HS Plugin
#1
Is it possible to code a Plugin, which will check if someone do hs, or maybe ns?
  Reply
#2
*push* we really need something like that!! Smile
  Reply
#3
This is for instakill:
Code:
public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage, string DamageMod, HitLocations HitLocation)
        {
              if (Weapon.Contains("desert"))
                return 100;
            else
                return base.OnPlayerDamaged(Attacker, Victim, Weapon, Damage, DamageMod, HitLocation);
        }

Maybe we can modify a locations (I don't know if possible)
But I guess it's possible, I think if we find it, and modify this code i twill work
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
  Reply
#4
I can never quite get to grips of MW3 terms these days.. HS means HEADSHOT, or it could mean HARDSCOPE? and NS?

both of these would be easy. As 99Irock said, but since weapon is a string, i'd say:


Quote: if (Weapon == "desert")
return 100;
else
return base.OnPlayerDamaged(Attacker, Victim, Weapon, Damage, DamageMod, HitLocation);

To add head shot detection in there it's pretty damn easy..

Quote:if (Weapon == "desert" &&
HitLocation == HitLocations.Head &&
Damage >= Victim.Other.Health)
{
ServerSay(" OMERGERHD " + Attacker.Name + " got a headshot with a!" + weapon,true);
}

I'm not sure changing the location is actually possible because we can only return damage, so you can't force an instagib headshot without rewriting things.. If so, for instant headshots you'd have to do something like:

Quote:OnPlayerDamaged(...)
{

KillPlayer( Attacker.ClientNum, Victim.ClientNum, GetWeapon(Weapon), you'll need to find the sMOD);

}

As for a hardscope mod.. I'm not sure, you could do a:

Quote:Dictionary alreadyinAds = new Dictionary<string, TimeDate>

OnServerFrame

foreach (client in GetClients())
{
timedate now = TimeDate.Now.ToUniversalTime();
if (client.Other.isAds == true && !alreadyinAds.ContainsKey(client.XUID))
{
alreadyinAds[client.XUID] = now;
}
else if (client.Other.isAds == false && alreadyinAds.ContainsKey(client.XUID))
{
TimeSpan td = now - alreadyinAds[client.XUID];
SayServer(client.Name + " was scoped for " + td.TotalSeconds(), true);
}


}
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 3,885 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 4,342 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 38,161 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 5,245 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 4,604 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 57,441 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 17,344 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 2,524 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 30,302 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 2,840 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread: 1 Guest(s)