Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: Nytrofactor
I ported a weapon and want it to be used in mp/campaign/zombies without typing the /give command. I read through this, but it won't work because I'm not doing it for a map, but for a mod, so there is no mapname.gsc. Is there any way to achieve this?
ModmeBot:
Reply By: natesmithzombies
You need to thread this function somewhere in your mod:
function new_start_weapon()
{
level flag::wait_till( "all_players_connected" );
players = GetPlayers();
foreach( player in players )
{
old_gun = player GetCurrentWeapon();
player TakeWeapon( old_gun );
gun = GetWeapon( "bo2_sig556" ); // Change to your weapon file name
player GiveWeapon( gun );
player SwitchToWeapon( gun );
}
}
It is kinda hard to guide you when you are doing a generic mod, so I hope you understand what you are doing. Drop a comment back if you are still lost