ItsMods

Full Version: Bonus for planting the Bomb (s&d)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys. i need a help.
im looking for a mod that will give you some bonuses if you planted the bomb.
my server is S&D bun nobody even trying to plant it :'(

is there excist any commands for giving something at planting?? for example new Perk or even killstreaks. like hariers.
thanks for attention . . .
look into _sd.gsc
Then find event which does bomb plant..
edit: im retarded
Ok going to check...
i found this to test. but nothing happened... i whought it should show me XAXAAXAXAXAXA text on top, but for some reason that doesnt happened.[/code][/quote][/php]
Code:
onPickup( player )
{
    
     player.isBombCarrier = true;
    player incPlayerStat( "bombscarried", 1 );
    player thread maps\mp\_matchdata::logGameEvent( "pickup", player.origin );
    
    self maps\mp\gametypes\_gameobjects::set2DIcon( "friendly", "waypoint_escort" );
    self maps\mp\gametypes\_gameobjects::set3DIcon( "friendly", "waypoint_escort" );
self iPrintlnBold("XAXAAXXAAAXAXAXAX");

    if ( !level.bombDefused )
    {
        teamPlayerCardSplash( "callout_bombtaken", player, player.team );        
        leaderDialog( "bomb_taken", player.pers["team"] );
    }
    maps\mp\_utility::playSoundOnPlayers( game["bomb_recovered_sound"], game["attackers"] );
}
There is this in _sd.gsc, try increasing that number. If it doesnt work youll have to edit _rank.gsc.

Code:
    maps\mp\gametypes\_rank::registerScoreInfo( "plant", 100 );
(09-01-2012, 09:07)Yamato Wrote: [ -> ]There is this in _sd.gsc, try increasing that number. If it doesnt work youll have to edit _rank.gsc.

Code:
    maps\mp\gametypes\_rank::registerScoreInfo( "plant", 100 );

seems like it gives to you extra XP for planted bomb. but i need extra killstreak as Gravzy noticed.
(09-01-2012, 10:03)islamsaab Wrote: [ -> ]seems like it gives to you extra XP for planted bomb. but i need extra killstreak as Gravzy noticed.


You could increase the killstreakCounter for planting the bomb by changing onUsePlantObject function in sd.gsc to this (look at the bottom of the function to see the things i've added):

Code:
onUsePlantObject( player )
{
    // planted the bomb
    if ( !self maps\mp\gametypes\_gameobjects::isFriendlyTeam( player.pers["team"] ) )
    {
        level thread bombPlanted( self, player );
        //player logString( "bomb planted: " + self.label );
        
        // disable all bomb zones except this one
        for ( index = 0; index < level.bombZones.size; index++ )
        {
            if ( level.bombZones[index] == self )
                continue;
                
            level.bombZones[index] maps\mp\gametypes\_gameobjects::disableObject();
        }
        
        player playSound( "mp_bomb_plant" );
        player notify ( "bomb_planted" );
            
        //if ( !level.hardcoreMode )
        //    iPrintLn( &"MP_EXPLOSIVES_PLANTED_BY", player );

        leaderDialog( "bomb_planted" );

        level thread teamPlayerCardSplash( "callout_bombplanted", player );
        
        
        

        level.bombOwner = player;
        player thread maps\mp\gametypes\_hud_message::SplashNotify( "plant", maps\mp\gametypes\_rank::getScoreInfoValue( "plant" ) );
        player thread maps\mp\gametypes\_rank::giveRankXP( "plant" );
        player.bombPlantedTime = getTime();
        maps\mp\gametypes\_gamescore::givePlayerScore( "plant", player );    
        player incPlayerStat( "bombsplanted", 1 );
        player thread maps\mp\_matchdata::logGameEvent( "plant", player.origin );
        
        //part iadded to increase killstreak and check if a new streak has to be given
        
        player.pers["cur_kill_streak"]++;
        
        level notify ( "player_got_killstreak_" + player.pers["cur_kill_streak"], player );
    
        if ( isAlive( player ) )
            player thread maps\mp\killstreaks\_killstreaks::checkKillstreakReward( player.pers["cur_kill_streak"] );

    }
}

It works like this:
Example: You have set predator as your 1st killstreak award

So if you are e.g. at a killstreak of 4 and plant the bomb you will get the predator, as the counter gets increased to 5 for planting.

You might want to add some popUp text/scorePopup etc. to inform the player that his killstreak got increased. I've just tested it with bots and it seems to work fine but you will have to test and check if it causes any bugs.
it works very well Big Grin Thank you.