HS Plugin
#1
Is it possible to code a Plugin, which will check if someone do hs, or maybe ns?

#2
*push* we really need something like that!! Smile

#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]

#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);
}


}



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 6,567 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 7,691 11-08-2013, 19:13
Last Post: clemi555
  Help Modifying plugin maverigh 5 7,733 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 8,407 10-19-2013, 06:59
Last Post: iRoNinja
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 3,694 09-13-2013, 09:31
Last Post: Hallla
  Search Plugin Fluid Killcam N3xT_974 1 4,020 09-10-2013, 20:27
Last Post: Nekochan
  !kill Plugin Hallla 1 3,540 09-07-2013, 22:30
Last Post: axel-le-meilleur
  God Mode Plugin - Everyone has rcon admin srskiller 4 7,911 08-28-2013, 19:03
Last Post: phillipito
  Donator Status Plugin tubwux 1 2,972 08-28-2013, 07:13
Last Post: DidUknowiPwn
  unlock max fps plugin lander 3 4,874 08-20-2013, 15:12
Last Post: Pozzuh

Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2026 Melroy van den Berg.