Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with some coding...
#1
Can someone make suicide don't count as a kill?

http://pastebin.com/JHdPhEJz

Code from Zxz's gungame

Suicide is this:
Code:
self doDamage(30, self.origin, self, self, 0, "MOD_FALLING", 0, "napalm_mp");
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#2
Where is "zxz" being notified from?
Reply

#3
(01-03-2011, 14:17)waffles Wrote: Where is "zxz" being notified from?
Code:
Callback_PlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration)
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#4
(01-03-2011, 14:25)alistair3149 Wrote:
(01-03-2011, 14:17)waffles Wrote: Where is "zxz" being notified from?
Code:
Callback_PlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration)

First change:

Code:
self waittill("zxz");

to:

Code:
self waittill("zxz", sMeansOfDeath );

Then in the Callback_PlayerKilled function, find where the self notify( "zxz" ) is, and change it to this:

Code:
self notify( "zxz", sMeansOfDeath );

This will allow you to check the type of death the player just experienced. Add a simple IF statement checking if the type is MOD_SUICIDE.
Reply

#5
Look for Callback_PlayerKilled and add this after:
Code:
[[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);

Code:
if(eAttacker == self)
    self.kills--;
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Android problem Yamato 12 8,170 04-25-2014, 04:49
Last Post: ScHmIdTy56789
  Problem with Rain Effects on Maps mitchhacker 5 4,855 10-22-2013, 00:46
Last Post: mitchhacker
  Help Liberation Problem Yamato 27 24,941 07-17-2013, 19:54
Last Post: feature
  [xna 4]Rendering problem narkos 9 5,934 07-03-2013, 19:00
Last Post: Nekochan
  Help Problem God plugin v4.0 4nonymous 1 2,724 06-22-2013, 23:25
Last Post: 8q4s8
  Help Infected Shop Plugin Problem Hallla 2 3,154 05-06-2013, 18:29
Last Post: Hallla
  problem with gsc code CheGuevara 5 5,604 04-20-2013, 15:06
Last Post: Nekochan
  problem to connect to server s.j-rez 0 2,232 04-17-2013, 18:18
Last Post: s.j-rez
  warning problem AndEEDJay 0 2,107 04-08-2013, 09:54
Last Post: AndEEDJay
  Help ADDON,PROBLEM HACK emilioxativa 5 4,827 04-03-2013, 08:16
Last Post: narkos

Forum Jump:


Users browsing this thread:
2 Guest(s)

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