Announcement

Collapse
No announcement yet.

Kills Minus Deaths Scoring System

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Kills Minus Deaths Scoring System

    Hi all,

    I run a UT2K4 sniper and camper server, if anyone out there has time, would it be possible to create a scoring mod:

    I'm looking for a Kills minus deaths = score.

    I know you can have a frag penalty, however I'm looking for something similar to the mod used by SAS sniper clan.

    http://wiki.beyondunreal.com/wiki/Sweavo

    Any help would be greatly appreciated.

    #2
    Here's the basic one to subtract one when killed by another player. It is net scoring in DM.

    Score Killed

    Comment


      #3
      Thanks L 7, appreciate that.

      Comment


        #4
        I'm using the mod on one of my servers, however, it changing back to the original settings after one map.

        It'll work for one match, but when we change it reverts back to the normal settings, is there anything I am doing wrong?

        I have not included any lines in either serverpackages or serveractors.

        Dave

        Comment


          #5
          I didn't think it mattered. It should be all server side. I can't remember if you need server packages for muts like vampire or big head. It's the same as those. Not much to this, can't really think of anything.

          Code:
          class MutScoreKilled extends Mutator;
          
          function PostBeginPlay()
          {
              local ScoreKilledGameRules G;
          
              Super.PostBeginPlay();
          
              G = Spawn( class'ScoreKilledGameRules' );
          
              if ( Level.Game.GameRulesModifiers == None )
              {
                  Level.Game.GameRulesModifiers = G;
              }
              else
              {
                  Level.Game.GameRulesModifiers.AddGameRules(G);
              }
          }
          
          defaultproperties
          {
              GroupName="Scoring"
              FriendlyName="Score Killed"
              Description="Subtracts one from player's scores when they are killed."
          }
          Code:
          class ScoreKilledGameRules extends GameRules;
          
          function ScoreKill( Controller Killer, Controller Killed )
          {
              if ( ( Killer != Killed ) && ( Killer != None ) )
              {
                  if ( ( Killed.PlayerReplicationInfo != None ) && ( Killed.bIsPlayer ) )
                  {
                      Killed.PlayerReplicationInfo.Score -= 1;
                      Killed.PlayerReplicationInfo.NetUpdateTime = Level.TimeSeconds - 1;
                  }
              }
          
              if ( NextGameRules != None )
              {
                  NextGameRules.ScoreKill( Killer, Killed );
              }
          }

          Comment


            #6
            hi mate, sorry about that, you were correct! I forgot to re-set my ini, it was selecting old settings, after every map it would return to the original mods... my bad! Thanks for the help, mod works great.

            Dave

            Comment

            Working...
            X