• 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]
[-] The following 1 user says Thank You to 99IRock for this post:
  • tubwux
  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
[-] The following 2 users say Thank You to Krusty123 for this post:
  • 99IRock, Nekochan
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Question Help Mw2 weapon skin question FroxIVx4 1 1,367 10-13-2013, 16:54
Last Post: hmann
Question Help Weapon Name iRoNinja 8 2,783 10-08-2013, 08:31
Last Post: iRoNinja
  Help Code color crosshairs koren30 3 1,805 10-02-2013, 19:26
Last Post: koren30
  Mw2 weapon porting? Cuddlyedits 3 1,905 09-15-2013, 16:43
Last Post: DidUknowiPwn
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 15,815 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Help need help?how to make plugins code hXnarutoXone 12 3,552 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Need Help with C# code tubwux 2 1,540 08-27-2013, 18:18
Last Post: tubwux
  [Request] Compile this code please dozsa0 4 1,850 08-10-2013, 21:02
Last Post: Nukem
  Compile this code please First_Semyon 12 3,988 08-08-2013, 14:53
Last Post: Bandarigoda123
  Compile please this code First_Semyon 8 2,454 07-28-2013, 01:52
Last Post: First_Semyon

Forum Jump:


Users browsing this thread: 1 Guest(s)