![]() |
|
Problem with some coding... - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: Problem with some coding... (/Thread-Problem-with-some-coding.html) |
Problem with some coding... - alistair3149 - 01-03-2011 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");RE: Problem with some coding... - waffles - 01-03-2011 Where is "zxz" being notified from? RE: Problem with some coding... - alistair3149 - 01-03-2011 (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)RE: Problem with some coding... - waffles - 01-03-2011 (01-03-2011, 14:25)alistair3149 Wrote:(01-03-2011, 14:17)waffles Wrote: Where is "zxz" being notified from? 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. RE: Problem with some coding... - master131 - 01-04-2011 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--; |