Modme Forums

How to set multiple weapons as starting weapons

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: Akrime
<h1>How to set multiple weapons as starting weapons</h1>
<hr>
first of all, you need to know the code name for the weapons you want as your starting weapons. For example: the Man-o-War is called "ar_damage".

If you have custom weapons, you have to write the same name you wrote in your map's zone file.
If you want to use the default BO3 weapons, here is a link to the list: Link to the weapon code names

<h2>NOTICE: You have to CREDIT me (Akrime), if you're going to use this script.</h2>

<h2>Steps</h2>

<h3>Step 1</h3>

Write this function at the bottom in your "zm_YOURMAP.gsc" file:


function PickRandomStartingWeapon()
{
	// CREDITS: Akrime

	// Array of starting weapons
	listOfStartingWeapons = strTok("pistol_standard ar_standard sniper_fastbolt sniper_powerbolt ar_marksman lmg_heavy "," ");

	// Picking the starting weapon
	startingWeapon = array::random(listOfStartingWeapons);
	level.start_weapon = getWeapon(startingWeapon);
}

In the line where it starts with "listOfStartingWeapons" you can replace the codenames for the weapons with your starting weapons as you wish. You can even add more weapons, but you have to seperate them with a blank space, just like in the code.

<h3>Step 2</h3>

Right BELOW this line (same file)
zm_usermap::main();

Add this line:
PickRandomStartingWeapon();


And that's it, you're done!

I hoped you liked my small tutorial!


BobbyLee298:

thx