Function Armor::damage(%this, %obj, %sourceObject, %position, %damage, %damageType)
{
if (%obj.getState() $= "Dead")
return;
%obj.applyDamage(%damage);
%location = "Body";
// Deal with client callbacks here because we don't have this
// information in the onDamage or onDisable methods
%client = %obj.client;
%sourceClient = %sourceObject ? %sourceObject.client : 0;
if (%obj.getState() $= "Dead"){
if (%sourceObject.client $= "")
%obj.client.deaths++;
if (!%obj.client){
%sourceClient = %sourceObject.client;
%sourceClient.incScore(1);
%sourceClient.kills++;
if (%sourceClient.score >= $Game::EndGameScore){
$Server::Roundwinner = %sourceClient.name;
tallyScores();
if ($AllTimeTeamDM)
updateClanWin("",%sourceClient.team);
%rawName = stripChars( detag( getTaggedString( %sourceClient.name ) ), "\cp\co\c6\c7\c8\c9" );
centerPrintAll(%rawName @ " Wins The Game!!!",2,2);
messageAll('MsgClientKilled','%1 pwns %2 for the win!',%sourceClient.name,%obj.getShapeName());
%messaged=1;
}
}
%client.onDeath(%sourceObject, %sourceClient, %damageType, %location);
}
My problem is I cant get points when you kill another client! But It records the ai deaths? Any one help?
Torque Owner Wade Lawrence
{
if (%obj.getState() $= "Dead")
return;
%obj.applyDamage(%damage);
%location = "Body";
// Deal with client callbacks here because we don't have this
// information in the onDamage or onDisable methods
%client = %obj.client;
%sourceClient = %sourceObject ? %sourceObject.client : 0;
if (%obj.getState() $= "Dead"){
if (%sourceObject.client $= "")
%obj.client.deaths++;
if (!%obj.client){
%sourceClient = %sourceObject.client;
%sourceClient.incScore(1);
%sourceClient.kills++;
if (%sourceClient.score >= $Game::EndGameScore){
$Server::Roundwinner = %sourceClient.name;
tallyScores();
if ($AllTimeTeamDM)
updateClanWin("",%sourceClient.team);
%rawName = stripChars( detag( getTaggedString( %sourceClient.name ) ), "\cp\co\c6\c7\c8\c9" );
centerPrintAll(%rawName @ " Wins The Game!!!",2,2);
messageAll('MsgClientKilled','%1 pwns %2 for the win!',%sourceClient.name,%obj.getShapeName());
%messaged=1;
}
}
%client.onDeath(%sourceObject, %sourceClient, %damageType, %location);
}
My problem is I cant get points when you kill another client! But It records the ai deaths? Any one help?