• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release] Every gun akimbo
#11
(12-28-2012, 13:17)99IRock Wrote:
(12-28-2012, 04:34)yokai134 Wrote: Modified Code

I didnt re-add explosives and if you want to add attachments go to the:
int newWeapon = GetWeapon("iw5_"+ command[1] + "_mp") and add the attachments you want all guns to use in the _mp part.
EX: _mp_xmags_silencer = Extended Mags and Silencer.
HOWEVER Since not all guns use the same attachments this will not always work!

Can't test it as my laptop is running Linux and not on Windows to run a LAN server from.

I believe I have all correct gun names in there, if not this is source code so fix it if it needs to fixed.

Cool but you better should not use secondary guns as akimbo, it's much more power, but still, we just have the attachment akimbo for that Tongue
Well looks nice, but I think the safest way is the long code.
But thanks for the good idea, and nice coding

(12-28-2012, 03:57)choobie Wrote:
(12-28-2012, 02:48)99IRock Wrote:
(12-28-2012, 02:42)8q4s8 Wrote: Nice release but it wouldn't it be much easier to make a command like !akimbo then split the message and add the weapon name or create a array for them?

Yep but I didn't try it, but it could be easy if I use something like this:
!akimbo iw5_ + clientsmessage(somethinglikethat) + _mp
... I still need to take a good look on splitting and arrays
Thanks anyway

great Job!! Smile
so far what I tested
mp7a not working
pp90m1a crashes and kicks you out (server still running though.

would it be possible to keep the messages on screen longer?

+rep

I will remove the pp90m1a than from the code.
The mp7 should work, but you just have 2 ammo bars right?
Otherwise I will take a look in the code again

Right. I see 2 ammo bars for the mp7 but just one gun.

BTW Thanks again for keeping MW3 alive with your plugins. You definitely ROCK!
I really would hate to see all this work everyone has done just fade away.


One more question / request off topic
Our clan has a good sniper server running now and I really like playing it.
But I would like to have the sniper rifles full screen with no sway and less recoil.
Is that possible for a plugin and am I asking for too much.

peace and Happy New YearBig Grin
[RBC] Choobie

Ratbag Clan

  Reply
#12
(12-28-2012, 23:11)choobie Wrote: Right. I see 2 ammo bars for the mp7 but just one gun.

BTW Thanks again for keeping MW3 alive with your plugins. You definitely ROCK!
I really would hate to see all this work everyone has done just fade away.


One more question / request off topic
Our clan has a good sniper server running now and I really like playing it.
But I would like to have the sniper rifles full screen with no sway and less recoil.
Is that possible for a plugin and am I asking for too much.

peace and Happy New YearBig Grin

I don'think that's possible, that would modify game files something I don't know it
EDIT:
The full screen, will be a texture hack, the less recoil, I think also a hack.
happy new year
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
  Reply
#13
I saw the code and I Puke
So I made it somewhat shorter.
CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Addon;
  5.  
  6. namespace AkimboPlugin
  7. {
  8. public class AkimboMagic : CPlugin
  9. {
  10. private const String PLUGINNAME = "AkimboPlugin";
  11. private void PrintHelp(String Message, ServerClient Client) {
  12. iPrintLnBold("[^1"+ PLUGINNAME +"^7]: "+ Message, Client);
  13. }
  14.  
  15. // AKIMBO COMMANDS
  16. public override ChatType OnSay(String Message, ServerClient Client, bool Teamchat)
  17. {
  18. bool help = false;
  19. // -----------------------------------------------------------------
  20. // Help commands
  21. // -----------------------------------------------------------------
  22. switch (Message)
  23. {
  24. case: "!helpa":
  25. PrintHelp("!smga | !lmga | !assaulta | !snipersa | !shotgunsa | !expla", Client);
  26. help = true;
  27. break;
  28. case: "!smga":
  29. PrintHelp("!mp5a | !mp7a | !pm9a | !p90a | !pp90m1a | !ump45a", Client);
  30. help = true;
  31. break;
  32. case: "!lmga":
  33. PrintHelp("!m60a | !mk46a | !pecha | !lswa | !mg36a", Client);
  34. help = true;
  35. break;
  36. case: "!assaulta":
  37. PrintHelp("!m4a | !ak47a | !m16a | !fada | !acra | !mk14a | !scara | !g36ca | !cm901a", Client);
  38. help = true;
  39. break;
  40. case: "!snipersa":
  41. PrintHelp("!barreta | !rsassa | !dragunova | !msra | !l96a1a | !as50a", Client);
  42. help = true;
  43. break;
  44. case: "!shotgunsa":
  45. PrintHelp("!1887a | !strikera | !aa12a | !usas12a | !spas12a", Client);
  46. help = true;
  47. break;
  48. case: "!expla":
  49. PrintHelp("!xm25a | !rpga", Client);
  50. help = true;
  51. break;
  52. }
  53. if (!help)
  54. {
  55. String weapon = Message.Substring(1, Message.Length - 2);
  56. int weaponID = GetWeapon("iw5_"+ weapon +"_mp");
  57. if (weaponID != 0)
  58. {
  59. Client.Other.PrimaryWeaponAkimbo = true;
  60. Client.Other.SecondaryWeaponAkimbo = true;
  61. Client.Other.PrimaryWeapon = weaponID;
  62. Client.Other.SecondaryWeapon = weaponID;
  63. Client.Other.CurrentWeapon = weaponID;
  64. Client.Ammo.PrimaryAmmoClip = 1034;
  65. Client.Ammo.SecondaryAmmoClip = 1034;
  66. return ChatType.ChatNone;
  67. }
  68. }
  69. return ChatType.ChatContinue;
  70. }
  71. }
  72. }


In the meantime I also fixed the error with !snipersa not working.
if (Message == "snipersa")

Also this works on the assumption that GetWeapon returns 0 on an invalid weapon. The documentation for the addon just plainly sucks because information about return values are not listed (and way more is missing).
  Reply
#14
Nice, but one thing.
xm25_mp
rpg_mp
They don't use iw5_
Maybe make an function for that?
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
  Reply
#15
akimbo xm25 and akimbo rpg :o
[Image: 24gu1a8.png]
  Reply
#16
(12-30-2012, 20:18)koro35 Wrote: akimbo xm25 and akimbo rpg :o

It works I tested it in server :p
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Big Grin Help akimbo [HARD] Tony. 5 3,088 03-26-2013, 15:19
Last Post: hillbilly
Rainbow [Release] [Code] Akimbo weapon fix (new) Nekochan 11 8,049 02-27-2013, 23:49
Last Post: Krusty123
  Help akimbo code new [HARD] Tony. 1 2,094 02-26-2013, 18:14
Last Post: 99IRock
  Help Akimbo Fix 99IRock 5 3,233 02-14-2013, 21:00
Last Post: 99IRock
  Akimbo any weapon? choobie 2 2,375 12-27-2012, 22:56
Last Post: 99IRock
Rainbow [Release] [Code] Akimbo weapon fix Nekochan 9 5,766 12-20-2012, 14:24
Last Post: 99IRock
  Help Akimbo guns 99IRock 5 4,820 11-18-2012, 11:36
Last Post: jari333
Question Akimbo Primary Weapons Kasperle 4 3,277 11-17-2012, 13:13
Last Post: 8q4s8
  Preview Akimbo in mw3 [Z00MBY] Alex 2 2,390 10-17-2012, 14:23
Last Post: jari333
Question Help Akimbo weapons [Z00MBY] Alex 4 3,300 10-17-2012, 14:22
Last Post: jari333

Forum Jump:


Users browsing this thread: 1 Guest(s)