ItsMods

Full Version: Variables in CodeCallback_PlayerKilled didn't work O.o - SOLVED
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have an very simple code in _callbacksetup.gsc but it didn't work...
The game starts without an Error but there comes no massage -_-

PHP Code:
CodeCallback_PlayerKilled(eInflictoreAttackeriDamagesMeansOfDeathsWeaponvDirsHitLoctimeOffsetdeathAnimDuration)
{
    
self endon("disconnect");
        
self.killer eAttacker;
        
self.sMeansOfDeath sMeansOfDeath;
        
eAttacker iprintlnbold(self.killer " - " self.sMeansOfDeath);
    [[
level.callbackPlayerKilled]](eInflictoreAttackeriDamagesMeansOfDeathsWeaponvDirsHitLoctimeOffsetdeathAnimDuration);

i have define the variables self.killer and self.sMeansOfDeath.

Do you know, why it didn't work?
try to change eAttacker to self
self to eAttacker lol Troll
Idk, BO dont have victim thing
(10-31-2011, 13:55)Se7en Wrote: [ -> ]try to change eAttacker to self
self to eAttacker lol Troll
Idk, BO dont have victim thing

If I change eAttacker to self, the text would shown on Hud of the Killed Player...
I want it on the hud of the Killer...
I'm not sure what happens when you print out an entity, or add a string to an entity, so try this:

eAttacker iprintlnbold(self.killer.name + " - " + self.sMeansOfDeath);

Also, is there any need for those two variables 'self.killer' and 'self.sMeansOfDeath'?
(11-01-2011, 22:43)Phl3x_ Wrote: [ -> ]I'm not sure what happens when you print out an entity, or add a string to an entity, so try this:

eAttacker iprintlnbold(self.killer.name + " - " + self.sMeansOfDeath);

Also, is there any need for those two variables 'self.killer' and 'self.sMeansOfDeath'?

No there isn't a need for this, but if i use eAttacker and sMeansOfDeath, it didnt work...
And i din't know, why...
Try printing them out individually, and if they don't print out, then they're undefined and the problem would be elsewhere.

iprintlnbold(eAttacker.name);
iprintlnbold(sMeansOfDeath);