enable scoreboard

Started by Eva, Apr 10, 2016, 05:13 PM

Previous topic - Next topic

Eva

still its wrong this way! teamkill and score is good but if i kill somebody from other team the one whos killed gets the score...
function onPlayerKill( player, killer, reason, bodypart )
{
 if ( stats[ player.ID ].LMS )
        {
         LMSCount--;
         EMessage( ">> " + player.Name + " is out of the LMS round." );
         stats[ player.ID ].LMS = false;
         if ( LMSCount == 1 ) CheckEnd( killer );
       stats[ player.ID ].Lost++;
        }
        killer.Score++; //Increases the score by 1.
        EchoMessage( "** [" + player.ID + "] " + player.Name + " was killed by " + killer.Name + "." );
        }


function onPlayerTeamKill( killer, player, reason, bodypart )
{
onPlayerKill( player, killer , reason, bodypart );
killer.Score -= 2; //Decreases the score by 1.
}

KAKAN

Use this function:
function onPlayerTeamKill( killer, player, reason, bodypart )
{
onPlayerKill( killer , player, reason, bodypart );
killer.Score -= 2; //Decreases the score by 1.
}
oh no