variable not getting called...
for some reason this variable isnt getting called.
its declared here:
then in defaultgame.cs, in function DefaultGame::onClientKilled();
%clVictim has the variable on their client, but it doesnt seem to call this little function here, IE nothing happens when clVictim is killed and clVictim.istaxed == true
what am i doing wrong?
its declared here:
function chekcash(%client){ if (%client.cash < 0){ messageclient(%client, 'MsgClient',"\c5You have no cash..."); messageall('MsgAll', "\c5"@%client.namebase@" is failing to pay his taxes... he must be punished at once."); messageall('MsgAll', "~wfx/bonuses/low-level4-popping.wav"); %client.istaxed = true; } }
then in defaultgame.cs, in function DefaultGame::onClientKilled();
if (%clVictim.istaxed == true){ %money=%clKiller.cash; %clKiller.cash=%money+1500; %clVictim.cash=100; messageclient(%clKiller, 'MsgClient',"\c5You successfully killed a taxed person: "@%clVictim.nameBase@"! You have been awarded \c1500 coins, \c5 and now have \c2"@%clKiller.cash@" coins!"); messageclient(%clVictim, 'MsgClient',"\c5You were successfully killed by: "@%clKiller.nameBase@". Your money has reset to 100, but don't lose it again."); messageall('MsgAll', "\c3"@%clVictim.namebase@", the tax denier, has been slayed by "@ %clKiller.namebase@"!"); messageAll("", '~wfx/misc/hunters_greed.wav'); %clVictim.istaxed = false; }
%clVictim has the variable on their client, but it doesnt seem to call this little function here, IE nothing happens when clVictim is killed and clVictim.istaxed == true
what am i doing wrong?
Comments
Other than that, you may just be missing something on the edge of your view. Stick a few echos in to tell you where it's at and you'll have better luck debugging.
it still doesnt do anything.
let me try and put it in the proper loop, hang on.