Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release [Code] Akimbo weapon fix (new)
#11
For @tubwux
To add more weapons, OLD CODE:
Code:
if (c.Other.isAlive)
                         {
                                 if (Client.Other.CurrentWeapon == GetWeapon("iw5_ak47_mp"))
                                 {
                                     Client.Other.PrimaryWeaponAkimbo = true;
                                     Client.Other.SecondaryWeaponAkimbo = true;
                                 }
                                 else
                                 {
                                     Client.Other.PrimaryWeaponAkimbo = false;
                                     Client.Other.SecondaryWeaponAkimbo = false;
                                 }
                         }

Make it this :
Code:
if (c.Other.isAlive)
                         {
                                 if (Client.Other.CurrentWeapon == GetWeapon("iw5_ak47_mp") ||Client.Other.CurrentWeapon == GetWeapon("secondweapon")  )
                                 {
                                     Client.Other.PrimaryWeaponAkimbo = true;
                                     Client.Other.SecondaryWeaponAkimbo = true;
                                 }
                                 else
                                 {
                                     Client.Other.PrimaryWeaponAkimbo = false;
                                     Client.Other.SecondaryWeaponAkimbo = false;
                                 }
                         }

Don't forget on the OnWeaponChange event
OLD:
Code:
if (Client.Other.CurrentWeapon != GetWeapon("iw5_ak47_mp"))
            {
Will be
Code:
if (Client.Other.CurrentWeapon != GetWeapon("iw5_ak47_mp") || Client.Other.CurrentWeapon != GetWeapon("secondweapon"))
            {

And,,, go search around for basic C# tuts.
Just some basic things me and @Gam3rr0rZ made a notice of (usefull for using the mw3 server addon, and some basic C# stuff) (the // is comment, I have this in the files of my plugin):
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
Reply

#12
(02-27-2013, 23:25)99IRock Wrote: // Color table:
// 0: Black
// 1: Red
// 2: Green
// 3: Yellow
// 4: Blue
// 5: Royal Blue
// 6: Magenta
// 7: White
// 8: Brown
// 9: Gray
You forgot:
^; = Dark Blue
^: = Gold Tongue
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Mw2 weapon skin question FroxIVx4 1 2,950 10-13-2013, 16:54
Last Post: hmann
Question Help Weapon Name iRoNinja 8 6,583 10-08-2013, 08:31
Last Post: iRoNinja
  Help Code color crosshairs koren30 3 4,015 10-02-2013, 19:26
Last Post: koren30
  Mw2 weapon porting? Cuddlyedits 3 4,734 09-15-2013, 16:43
Last Post: DidUknowiPwn
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 33,265 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Help need help?how to make plugins code hXnarutoXone 12 8,542 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Need Help with C# code tubwux 2 3,309 08-27-2013, 18:18
Last Post: tubwux
  [Request] Compile this code please dozsa0 4 4,128 08-10-2013, 21:02
Last Post: Nukem
  Compile this code please First_Semyon 12 9,667 08-08-2013, 14:53
Last Post: Bandarigoda123
  Compile please this code First_Semyon 8 5,635 07-28-2013, 01:52
Last Post: First_Semyon

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.