I made this about a week ago. whenever I saw the idea of pointstreaks in MW3 I tought that would be kinda nice to have in a game where nobody plays the objective.
I tought it would be really hard to do and stuff, but after looking tru alot of stuff its actually only 1 simple function... lol.
just call it on _load.gsc or something
Its still untested but I do not have blops installed anymore so I dont feel like installing it just to test, I'm pretty sure it works anyway.
You can add more events to the array, the ones that exist in the game are these:
I tought it would be really hard to do and stuff, but after looking tru alot of stuff its actually only 1 simple function... lol.
C++ Code
- #include common_scripts\utility;
- #include maps\mp\_utility;
-
- init()
- {
- // the player will recieve a 'point' on one of these events
- level.pointstreak = array( "capture",
- "kill_carrier",
- "plant",
- "defuse",
- "destroyer" );
-
- // this will make the script run
- level.onPlayerScore = :<img src="https://www.itsmods.com/forum/images/smilies/confused.gif" alt="Confused" title="Confused" class="smilie smilie_13" />treakCheck;
- }
-
- streakCheck( event, player, victim );
- {
- if ( !isKillStreaksEnabled() )
- return;
-
- if( !level.teamBased )
- return;
-
- // this runs on every EVENT, which means also on a kill, suicide, and every other
- // time the 'givePlayerScore' function gets called. it only gives a point if it is a valid event
- isValidPointstreak = false;
-
- for( i = 0; i < level.pointstreak.size; i++ )
- if( event == level.pointstreak[i] )
- isValidPointstreak = true;
-
- // give the point if its valid
- if( isValidPointstreak )
- {
- player.pers[ "cur_kill_streak" ]++;
- player thread maps\mp\gametypes\_hardpoints::giveKillstreakForStreak();
- }
-
- // default onPlayerScore stuff
- maps\mp\gametypes\_globallogic_score::default_onPlayerScore( event, player, victim );
- }
just call it on _load.gsc or something
Code:
maps\mp\WHATEVER_YOU_NAMED_IT::init();
Its still untested but I do not have blops installed anymore so I dont feel like installing it just to test, I'm pretty sure it works anyway.
You can add more events to the array, the ones that exist in the game are these:
Code:
capture // captured a: dom point, flag, headquarters
kill // killed someone
headshot // made a headshot
suicide // suicided
kill_carrier // killed the flagcarrier=
destroyer // destroyed a bombsite
defuse // defused a bomb
plant // planted a bomb
pickup // picked up a ctf flag
assault // killed a flag/headquarters defender
defend // defended your flag/headquarters
melee_kill // melee kill, used in wager matches
hatchet_kill // hatchet kill, used in wager matches
other_kill // unknown .. used in wager matches
death // you died
(08-10-2011, 12:58)Pozzuh Wrote:Se7en Wrote:Stealed, from cod4 mod ...look who's talking
[Release] Old School Mod v2.2
[Release] Scroll menu