Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Team Deathmatch with restrictions
#1
Can someone please make a mod thats regular team deathmatch, but replaces stuns with flash, removes noob tubes, removes death streaks, removes last stand? Or teach me how to do it. Thank you!
Reply

#2
To do this youll need to modify _class.gsc ( Clean file: http://pastebin.com/nt3nBMUR )

To remove deathstreaks youll need to delete all this part of the code

Code:
    // only give the deathstreak for the initial spawn for this life.
    if ( loadoutDeathStreak != "specialty_null" && getTime() == self.spawnTime )
    {
        deathVal = int( tableLookup( "mp/perkTable.csv", 1, loadoutDeathStreak, 6 ) );
                
        if ( self getPerkUpgrade( loadoutPerk1 ) == "specialty_rollover" || self getPerkUpgrade( loadoutPerk2 ) == "specialty_rollover" || self getPerkUpgrade( loadoutPerk3 ) == "specialty_rollover" )
            deathVal -= 1;
        
        if ( self.pers["cur_death_streak"] == deathVal )
        {
            self thread maps\mp\perks\_perks::givePerk( loadoutDeathStreak );
            self thread maps\mp\gametypes\_hud_message::splashNotify( loadoutDeathStreak );
        }
        else if ( self.pers["cur_death_streak"] > deathVal )
        {
            self thread maps\mp\perks\_perks::givePerk( loadoutDeathStreak );
        }
    }

To remove the other last stand (perk 3) find this in _class and remove the line "case "specialty_pistoldeath"":

Code:
isValidPerk3( refString )
{
    switch ( refString )
    {
        case "specialty_extendedmelee":
        case "specialty_bulletaccuracy":
        case "specialty_localjammer":
        case "specialty_heartbreaker":
        case "specialty_detectexplosive":
        case "specialty_pistoldeath": //remove this line
            return true;
        default:
            assertMsg( "Replacing invalid perk3: " + refString );
            return false;
    }
}

And to remove GL you can do it similar to the previous, see what I comment:

Code:
isValidAttachment( refString )
{
    switch ( refString )
    {
        case "none":
        case "acog":
        case "reflex":
        case "silencer":
        case "grip":
        case "gl": //remove this line
        case "akimbo":
        case "thermal":
        case "shotgun":
        case "heartbeat":
        case "fmj":
        case "rof":
        case "xmags":
        case "eotech":  
        case "tactical":
            return true;
        default:
            assertMsg( "Replacing invalid equipment weapon: " + refString );
            return false;
    }
}

isValidSecondary( refString )
{
    switch ( refString )
    {
        case "beretta":
        case "usp":
        case "deserteagle":
        case "coltanaconda":
        case "glock":
        case "beretta393":
        case "pp2000":
        case "tmp":
        case "m79": //remove this line, its thumper
        case "rpg": //rpg
        case "at4": //at4
        case "stinger":
        case "javelin":
        case "ranger":
        case "model1887":
        case "striker":
        case "aa12":
        case "m1014":
        case "spas12":
        case "onemanarmy": //DONT remove this line, or mod will crash :D
            return true;
        default:
            assertMsg( "Replacing invalid secondary weapon: " + refString );
            return false;
    }
}

I am not really sure if removing this single line will also solve GL problem, but it could remove shotgun attachment too, use this if the other doesnt work:

Code:
    self _SetActionSlot( 3, "altMode" );

For replacing stun with flash search for this lines, I hope this works:

Code:
    // Secondary Offhand
    offhandSecondaryWeapon = loadoutOffhand + "_mp";
    if ( loadoutOffhand == "flash_grenade" )
        self SetOffhandSecondaryClass( "flash" );
    else
        self SetOffhandSecondaryClass( "smoke" );
    
    self giveWeapon( offhandSecondaryWeapon );
    if( loadOutOffhand == "smoke_grenade" )
        self setWeaponAmmoClip( offhandSecondaryWeapon, 1 );
    else if( loadOutOffhand == "flash_grenade" )
        self setWeaponAmmoClip( offhandSecondaryWeapon, 2 );
    else if( loadOutOffhand == "concussion_grenade" )
        self setWeaponAmmoClip( offhandSecondaryWeapon, 2 );
    else
        self setWeaponAmmoClip( offhandSecondaryWeapon, 1 );

Change the previous to ( I have added 3 lines after // Secondary Offhand ):

Code:
    // Secondary Offhand
    if( loadoutOffhand == "concussion_grenade" )
        offhandSecondaryWeapon = "flash_grenade_mp";
    else
        offhandSecondaryWeapon = loadoutOffhand + "_mp";
    if ( loadoutOffhand == "flash_grenade" )
        self SetOffhandSecondaryClass( "flash" );
    else
        self SetOffhandSecondaryClass( "smoke" );
    
    self giveWeapon( offhandSecondaryWeapon );
    if( loadOutOffhand == "smoke_grenade" )
        self setWeaponAmmoClip( offhandSecondaryWeapon, 1 );
    else if( loadOutOffhand == "flash_grenade" )
        self setWeaponAmmoClip( offhandSecondaryWeapon, 2 );
    else if( loadOutOffhand == "concussion_grenade" )
        self setWeaponAmmoClip( offhandSecondaryWeapon, 2 );
    else
        self setWeaponAmmoClip( offhandSecondaryWeapon, 1 );
Reply

#3
Thank you, this answers a lot of my questions as well!

I'm running 6 servers off of 1 set of files, in order to do changes like this for only a few servers, I will need to use a different set of files, yes?
Reply

#4
(12-26-2014, 16:25)soothaa Wrote: Thank you, this answers a lot of my questions as well!

I'm running 6 servers off of 1 set of files, in order to do changes like this for only a few servers, I will need to use a different set of files, yes?

In the servers where you want these changes put the _class.gsc with the modifications I said in the previous post Smile
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.