Help How to make a hug message when somebody kill's you with a specific weapon?
#1
For example - I want to add 'bad luck' when somebody kills me with a Tomahawk!
How would I do that?
Reply

#2
Code:
if ( iDamage > 99 && sWeapon == "tomohawk_mp" ) { self thread maps\mp\gametypes\_hud_message::hintMessage("^4Bad Luck", 3); }


If u wanted to show something on the killers screen.. (i would)

Code:
if ( iDamage > 99 && sWeapon == "tomohawk_mp" ) { eattacker thread maps\mp\gametypes\_hud_message::hintMessage("^4Nice Throw, Bad Idiot!", 3); }

add that to your globallogic player file around the 900th line where you see shit about flash / grenades.. not sure if thats the right weapon name for it, you might need to find that for yourself..
Reply

#3
I cannot get it to work every time i add the global player file it cannon compile it
Reply

#4
Maybe this will work:

Code:
if (sWeapon == "mp_hatchet") { self maps\mp\gametypes\_hud_message::hintMessage("^4Bad Luck", 3); }

And put it after this code(it's somewhere in player_killed()):
Code:
if ( (!isDefined( attacker ) || attacker.classname == "trigger_hurt" || attacker.classname == "worldspawn" || attacker == self ) && isDefined( self.attackers ) ) { if ( !isDefined(bestPlayer) ) { for ( i = 0; i < self.attackers.size; i++ ) { player = self.attackers[i]; if ( !isDefined( player ) ) continue; if (!isDefined( self.attackerDamage[ player.clientId ] ) || ! isDefined( self.attackerDamage[ player.clientId ].damage ) ) continue; if ( player == self || (level.teamBased && player.team == self.team ) ) continue; if ( self.attackerDamage[ player.clientId ].lasttimedamaged + 2500 < getTime() ) continue; if ( !allowedAssistWeapon( self.attackerDamage[ player.clientId ].weapon ) ) continue; if ( self.attackerDamage[ player.clientId ].damage > 1 && ! isDefined( bestPlayer ) ) { bestPlayer = player; bestPlayerMeansOfDeath = self.attackerDamage[ player.clientId ].meansOfDeath; bestPlayerWeapon = self.attackerDamage[ player.clientId ].weapon; } else if ( isDefined( bestPlayer ) && self.attackerDamage[ player.clientId ].damage > self.attackerDamage[ bestPlayer.clientId ].damage ) { bestPlayer = player; bestPlayerMeansOfDeath = self.attackerDamage[ player.clientId ].meansOfDeath; bestPlayerWeapon = self.attackerDamage[ player.clientId ].weapon; } } } if ( isdefined ( bestPlayer ) ) bestPlayer maps\mp\_medals::assistedSuicide(bestPlayerWeapon); }
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Sentry Gun kill = Player kill Snake 8 8,251 11-07-2013, 13:41
Last Post: Nekochan
Question Help Mw2 weapon skin question FroxIVx4 1 3,882 10-13-2013, 16:54
Last Post: hmann
  Make area detect. flag Teleport lewisbibo 4 6,729 10-12-2013, 18:10
Last Post: EnVi Sweden Rocks
Wink Make Platforme lewisbibo 5 7,036 10-08-2013, 14:35
Last Post: 8q4s8
Question Help Weapon Name iRoNinja 8 8,829 10-08-2013, 08:31
Last Post: iRoNinja
  Make obj MW3.by lewisbibo lewisbibo 3 4,993 10-05-2013, 20:16
Last Post: Nekochan
  Make obj MW3.by lewisbibo lewisbibo 0 3,284 10-03-2013, 20:19
Last Post: lewisbibo
  Mw2 weapon porting? Cuddlyedits 3 6,528 09-15-2013, 16:43
Last Post: DidUknowiPwn
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 44,690 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  !kill Plugin Hallla 1 3,502 09-07-2013, 22:30
Last Post: axel-le-meilleur

Forum Jump:


Users browsing this thread:
1 Guest(s)

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