View Full Version : new weapon script
malyczolg
15th June 2013, 11:03
hello , how can i make : 
if player has m1 garand on primary[a] script change m1 garand on mp44
Loveboy
15th June 2013, 11:12
weapon = "mp44_mp";
self giveWeapon(weapon, primary);
primaryb is the secoundary weapon
malyczolg
15th June 2013, 11:39
if(weapon, primary == "m1garand_mp");
{
weapon = "mp44_mp";
self giveWeapon(weapon, primary);
}
so ?
Tally
15th June 2013, 12:56
if(weapon, primary == "m1garand_mp");
{
weapon = "mp44_mp";
self giveWeapon(weapon, primary);
}
so ?
Nope. You have to put a weapon in either the "primary" or "primaryb" weapon slot, and then switch to the weapon:
	if( self getWeaponSlotWeapon( "primary" ) == "m1garand_mp" )
	{
		weapon = "mp44_mp";
		
		self TakeWeapon( "m1garand_mp" );
		self GiveWeapon( weapon );
		self setWeaponSlotWeapon( "primary", weapon );
		self GiveMaxAmmo( weapon );
		self switchToWeapon( weapon );
	}
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.