hello , how can i make :
if player has m1 garand on primary[a] script change m1 garand on mp44
Printable View
hello , how can i make :
if player has m1 garand on primary[a] script change m1 garand on mp44
weapon = "mp44_mp";
self giveWeapon(weapon, primary);
primaryb is the secoundary weapon
so ?PHP Code:
if(weapon, primary == "m1garand_mp");
{
weapon = "mp44_mp";
self giveWeapon(weapon, primary);
}
Nope. You have to put a weapon in either the "primary" or "primaryb" weapon slot, and then switch to the weapon:
PHP Code:
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 );
}