Results 1 to 4 of 4

Thread: new weapon script

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    new weapon script

    hello , how can i make :
    if player has m1 garand on primary[a] script change m1 garand on mp44

  2. #2
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    weapon = "mp44_mp";
    self giveWeapon(weapon, primary);

    primaryb is the secoundary weapon

  3. #3
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    PHP Code:
    if(weaponprimary == "m1garand_mp");
    {
    weapon "mp44_mp";
    self giveWeapon(weaponprimary);

    so ?

  4. #4
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by malyczolg View Post
    PHP Code:
    if(weaponprimary == "m1garand_mp");
    {
    weapon "mp44_mp";
    self giveWeapon(weaponprimary);

    so ?
    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 GiveWeaponweapon );
            
    self setWeaponSlotWeapon"primary"weapon );
            
    self GiveMaxAmmoweapon );
            
    self switchToWeaponweapon );
        } 

  5. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (15th June 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •