Author Topic: Headshot Bonus  (Read 5911 times)

Offline Shoemaker

  • Rank: Private
  • *
  • Posts: 15
Headshot Bonus
« on: July 17, 2008, 03:16:28 am »
For the past few days I have started looking at files to see how to get a headshot bonus system working but as usual I end up with a headache :oops:

I did find this line in _globallogic:

//if(sMeansOfDeath == "MOD_HEAD_SHOT") attacker.pers["score"] += level.ex_headshotbonus; //Joker - Needs testing

If you ever get time to work on this I think it would be a great addition especially for sniper servers that currently use longrange rifles which you only have to clip a toenail to kill someone.  With bonus points for a headshot it would add a skill challenge that many players would enjoy.

Not a must have, but a nice to have.

Thanks for reading.

Shoe

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Headshot Bonus
« Reply #1 on: July 17, 2008, 08:33:53 am »
In the works m8


Offline Shoemaker

  • Rank: Private
  • *
  • Posts: 15
Headshot Bonus
« Reply #2 on: July 17, 2008, 09:12:49 am »
Great news........not that I ever get close to a headshot but for others it will be fun :wink:

I shall keep my eyes peeled for any update.

Many thanks.

Shoe

Offline PvtWhoOkid

  • Rank: Private
  • *
  • Posts: 425
    • http://www.tya-clan.com
Headshot Bonus
« Reply #3 on: July 17, 2008, 09:52:13 am »
Pssssssssst, this is my favorite one  :D


Offline X4A_US_Wannabe

  • Rank: Private
  • *
  • Posts: 137
    • http://www.x4aftermath.com
Headshot Bonus
« Reply #4 on: July 17, 2008, 04:34:31 pm »
Why does this thread confuse me?

It's already a feature of X4, located in the monitoring.cfg...

Code: [Select]
// Reward system for Headshot Kills
// 0 = Off (default)
// 1 = On
set ex_headshot_reward "1"

// Points to be award to a player that gets a Headshot
// 0 = min (default)
// 99 = max
set ex_headshot_points "5"


How did I get this...???

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Headshot Bonus
« Reply #5 on: July 17, 2008, 05:23:01 pm »
A couple people -- like Kid and you Wanna -- have gotten it as a by-product of another fix ;)

Offline Kenny

  • Rank: Private
  • *
  • Posts: 22
    • http://www.codsnipers.co.uk
Headshot Bonus
« Reply #6 on: July 17, 2008, 05:36:11 pm »
Quote from: "{PST}*Joker"
A couple people -- like Kid and you Wanna -- have gotten it as a by-product of another fix ;)


I was thinking that myself, we've had it running on our server a few weeks now, didn't know it hadn't been realeased.

I beleive if i remember right was something to do with the LR script fix or something along they lines that Sniperone posted a while back.

Offline GrymmWolf

  • Rank: Private
  • *
  • Posts: 44
    • http://www.hrgamers.com
Headshot Bonus
« Reply #7 on: July 18, 2008, 12:07:44 pm »
Can someone share this coolness with the rest of the community? I know our guys would love this!!

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Headshot Bonus
« Reply #8 on: July 18, 2008, 12:58:22 pm »
Quote from: "GrymmWolf"
Can someone share this coolness with the rest of the community? I know our guys would love this!!


I'll put this up for you guys right after work

Offline GrymmWolf

  • Rank: Private
  • *
  • Posts: 44
    • http://www.hrgamers.com
Headshot Bonus
« Reply #9 on: July 18, 2008, 01:38:26 pm »
Joker you sir are a wonderful man!! Thanks bro!! If you were up here in the Great White North I'd buy ya a beer!

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Headshot Bonus
« Reply #10 on: July 18, 2008, 01:42:15 pm »
Quote from: "GrymmWolf"
Joker you sir are a wonderful man!! Thanks bro!! If you were up here in the Great White North I'd buy ya a beer!


OMG Please please please don't say that word right now :(

I'm out until Payday and it just hurts to hear the word beer  :cry:

Offline 105HolyMoly

  • Rank: Private
  • *
  • Posts: 188
    • http://holymolymods.com
Headshot Bonus
« Reply #11 on: July 18, 2008, 03:48:58 pm »
Me too please!! Have been looking for a point fix for some time. :D

Thanks in advance,

 [105] Holy Moly

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Headshot Bonus
« Reply #12 on: July 18, 2008, 03:50:04 pm »
Quote
buy ya a beer!


Hmmmm, I don't see any beer ;)

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Headshot Bonus
« Reply #13 on: July 18, 2008, 03:58:50 pm »
config/monitoring.cfg

Code: [Select]

//******************************************************************************
// Reward/Bonus Points for Headshots and Knife Kills
//******************************************************************************
// Reward system for Headshot Kills
// 0 = Off (default)
// 1 = On
set ex_headshot_reward "1"

// Points to be award to a player that gets a Headshot
// 0 = min (default)
// 99 = max
set ex_headshot_points "10"

// Reward system for Knife Kills
// 0 = Off (default)
// 1 = On
set ex_melee_reward "1"

// Points to be award to a player that kills with a Knife
// 0 = min (default)
// 99 = max
set ex_melee_points "10"


extreme\_ex_varcache.gsc

Code: [Select]

//****************************************************************************
// X4 Knife/Headshot Reward System
//****************************************************************************
level.ex_headshotreward = [[level.ex_dvardef]] ("ex_headshot_reward", 0, 0, 1, "int");
level.ex_headshotpoints = [[level.ex_dvardef]] ("ex_headshot_points", 0, 0, 99, "int");
level.ex_meleereward = [[level.ex_dvardef]] ("ex_melee_reward", 0, 0, 1, "int");
level.ex_meleepoints = [[level.ex_dvardef]] ("ex_melee_points", 0, 0, 99, "int");


extreme\_ex_obituary.gsc

About line 194, search for if(isSpecialMOD(sMeansOfDeath)) // special MOD

In that Array you will see case "MOD_HEAD_SHOT": and case "MOD_MELEE":

Replace them with the following

Code: [Select]

case "MOD_HEAD_SHOT":
{
obitad(attacker, "headshotkill", "headshotdeath", "", sMeansOfDeath, sWeapon);
if(isWeaponType(sWeapon, "sniper")) obitstat(attacker, "sniperkill", "sniperdeath");
obitmain(attacker, sWeapon, sHitLoc, false);
if(self.ex_obmonpmsg) attacker thread maps\mp\gametypes\_hud_message::oldNotifyMessage( &"OBITUARY_HEADSHOT" );
if(self.ex_obmonpsound) attacker playlocalSound("headshot");
if(level.ex_headshotreward)
{
attacker.pers["score"] = attacker.pers["score"] + level.ex_headshotpoints;
attacker.score = attacker.score + 5;
if(self.ex_obmonpmsg) attacker iprintlnbold("Headshot bonus: ^2+ " + level.ex_headshotpoints + " ^7pts");
}
break;
}


Code: [Select]

case "MOD_MELEE":
{
obitad(attacker, "knifekill", "knifedeath", "knifewhip", sMeansOfDeath, sWeapon);
if(self.ex_obmonpmsg) self thread maps\mp\gametypes\_hud_message::oldNotifyMessage( &"OBITUARY_HUMILIATION" );
if(self.ex_obmonpsound) self playlocalSound("humiliation");
if(level.ex_meleereward)
{
attacker.pers["score"] = attacker.pers["score"] + level.ex_meleepoints;
attacker.score = attacker.score + 5;
if(self.ex_obmonpmsg) attacker iprintlnbold("Knife bonus: ^2+ " + level.ex_meleepoints + " ^7pts");
}
break;
}

Offline GrymmWolf

  • Rank: Private
  • *
  • Posts: 44
    • http://www.hrgamers.com
Headshot Bonus
« Reply #14 on: July 18, 2008, 04:18:34 pm »
Here pick one.... :D






Thanks very much Joker!! I can already hear the insane giggles begin...