Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Code snippet] Change killstreak needed to earn rewards

Featured Replies

Опубликовано:

Hey,

i am re-releasing this, since i havent found something similar here yet.

Its not really about customizing the killstreaks, just about changing the amount of consecutive kills needed for the "normal" killstreaks rewards. :)

E.g. you can change the nuke, so that it needs a killstreak of 30.

It works for every killstreak reward. You can set it to any value you want to. (You shouldn't set a streak lower than 2 because otherwise the hardline perk would be buggy. )

 

*Lets start:

 

Get a clean _class.gsc and find the function setKillstreaks( streak1, streak2, streak3 )

 

You will find if conditions if ( streak1 != "none" ) , if ( streak2 != "none" ) and if ( streak3 != "none" ) .

 

The part of code looks like this:

 

if ( streak1 != "none" )
{
	//if ( !level.splitScreen )
		streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak1, 4 ) );
	//else
	//	streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak1, 5 ) );
	killStreaks[streakVal + modifier] = streak1;
}

if ( streak2 != "none" )
{
	//if ( !level.splitScreen )
		streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak2, 4 ) );
	//else
	//	streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak2, 5 ) );
	killStreaks[streakVal + modifier] = streak2;
}

if ( streak3 != "none" )
{
	//if ( !level.splitScreen )
		streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak3, 4 ) );
	//else
	//	streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak3, 5 ) );
	killStreaks[streakVal + modifier] = streak3;
}

 

You may change the streakVal in : killStreaks[streakVal + modifier] = streak1; to any number >= 2.

The number sets the amount of consecutive kills (killstreak) needed to get the first killstreak reward.

The variable modifier makes sure that you will get killstreak reward one kill ealier, if you have hardline (pro) .

streak2 and streak3 work the same way.

 

To be able to costumize the needed killstreak for every single killstreak reward we will add switch statements with all the killstreak names like this:

 

 

	if ( streak1 != "none" )
{
	//if ( !level.splitScreen )
		streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak1, 4 ) );
	//else
	//	streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak1, 5 ) );

	switch(streak1) {
		case "uav":
			killStreaks[3+modifier] = streak1;
			break;
		case "counter_uav":
			killStreaks[4+modifier] = streak1;
			break;
		case "predator_missile":
			killStreaks[5+modifier] = streak1;
			break;
		case "helicopter":
			killStreaks[7+modifier] = streak1;
			break;
		case "sentry":
			killStreaks[5+modifier] = streak1;
			break;
		case "harrier_airstrike":
			killStreaks[7+modifier] = streak1;
			break;
		case "precision_airstrike":
			killStreaks[6+modifier] = streak1;
			break;
		case "stealth_airstrike":
			killStreaks[9+modifier] = streak1;
			break;
		case "helicopter_flares":
			killStreaks[9+modifier] = streak1;
			break;
		case "helicopter_minigun":
			killStreaks[11+modifier] = streak1;
			break;
		case "ac130":
			killStreaks[11+modifier] = streak1;
			break;
		case "emp":
			killStreaks[11+modifier] = streak1;
			break;
		case "nuke":
			killStreaks[30+modifier] = streak1;
			break;
		case "airdrop":
			killStreaks[4+modifier] = streak1;
			break;
		case "airdrop_mega":
			killStreaks[8+modifier] = streak1;
			break;
		default:
			killStreaks[streakVal + modifier] = streak1;
			break;
	}



}

if ( streak2 != "none" )
{
	//if ( !level.splitScreen )
		streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak2, 4 ) );
	//else
	//	streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak2, 5 ) );

	switch(streak2) {
		case "uav":
			killStreaks[3+modifier] = streak2;
			break;
		case "counter_uav":
			killStreaks[4+modifier] = streak2;
			break;
		case "predator_missile":
			killStreaks[5+modifier] = streak2;
			break;
		case "helicopter":
			killStreaks[7+modifier] = streak2;
			break;
		case "sentry":
			killStreaks[5+modifier] = streak2;
			break;
		case "harrier_airstrike":
			killStreaks[7+modifier] = streak2;
			break;
		case "precision_airstrike":
			killStreaks[6+modifier] = streak2;
			break;
		case "stealth_airstrike":
			killStreaks[9+modifier] = streak2;
			break;
		case "helicopter_flares":
			killStreaks[9+modifier] = streak2;
			break;
		case "helicopter_minigun":
			killStreaks[11+modifier] = streak2;
			break;
		case "ac130":
			killStreaks[11+modifier] = streak2;
			break;
		case "emp":
			killStreaks[11+modifier] = streak2;
			break;
		case "nuke":
			killStreaks[30+modifier] = streak2;
			break;
		case "airdrop":
			killStreaks[4+modifier] = streak2;
			break;
		case "airdrop_mega":
			killStreaks[8+modifier] = streak2;
			break;
		default:
			killStreaks[streakVal + modifier] = streak2;
			break;
	}
}

if ( streak3 != "none" )
{
	//if ( !level.splitScreen )
		streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak3, 4 ) );
	//else
	//	streakVal = int( tableLookup( "mp/killstreakTable.csv", 1, streak3, 5 ) );

	switch(streak3) {
		case "uav":
			killStreaks[3+modifier] = streak3;
			break;
		case "counter_uav":
			killStreaks[4+modifier] = streak3;
			break;
		case "predator_missile":
			killStreaks[5+modifier] = streak3;
			break;
		case "helicopter":
			killStreaks[7+modifier] = streak3;
			break;
		case "sentry":
			killStreaks[5+modifier] = streak3;
			break;
		case "harrier_airstrike":
			killStreaks[7+modifier] = streak3;
			break;
		case "precision_airstrike":
			killStreaks[6+modifier] = streak3;
			break;
		case "stealth_airstrike":
			killStreaks[9+modifier] = streak3;
			break;
		case "helicopter_flares":
			killStreaks[9+modifier] = streak3;
			break;
		case "helicopter_minigun":
			killStreaks[11+modifier] = streak3;
			break;
		case "ac130":
			killStreaks[11+modifier] = streak3;
			break;
		case "emp":
			killStreaks[11+modifier] = streak3;
			break;
		case "nuke":
			killStreaks[30+modifier] = streak3;
			break;
		case "airdrop":
			killStreaks[4+modifier] = streak3;
			break;
		case "airdrop_mega":
			killStreaks[8+modifier] = streak3;
			break;
		default:
			killStreaks[streakVal + modifier] = streak3;
			break;
	}

}

 

Now you ready to costumize every killstreak.

(There are some unneeded cases in it (e.g. u cant have uav as your streak3) but i am too lazy to delete them, so you can figure out yourself or just leave them in.)

In the code above all the killstreak reward are given at the stock killstreak count (hopefully), besides emp and nuke.

 

*You can even set more killstreaks if you want to.

E.g.

Add:

 

killStreaks[10+modifier] = "ac130";

 

below the last closed bracket of if ( streak3 != "none" ) {}

 

every player will get an ac130 at a killstreak of 10 (9 when he has hardline).

Unregarded which killstreaks 1-3 he has chosen.

 

 

*Video:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.