• 4 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release MW3: Random Weapon Plugin V1
#31
Well I haven't gotten enough time to mess with it since I had volunteered today and yesterday. I really won't have time to work with this since I have school VERY soon. If it's okay with JayDi I will send you it.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
  Reply
#32
JayDi has kindly sent me the source, but any help on restricting weapons for infected would be appreciated.
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#33
CSHARP Code
  1. if (Client.Team != Teams.Axis)
  2. {
  3. giverandomweapon(Client);
  4. } else {
  5. TellClient("Zombies stink!",null);
  6. }
(XS4ALL/GoT2DayZ) DayZ Servers (http://got2dayz.nl)
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
http://fb.me/GoT2DayZ
[-] The following 2 users say Thank You to JoSchaap for this post:
  • DidUknowiPwn, hillbilly
  Reply
#34
(07-18-2012, 16:21)pieter Wrote:
CSHARP Code
  1. if (Client.Team != Teams.Axis)
  2. {
  3. giverandomweapon(Client);
  4. } else {
  5. TellClient("Zombies stink!",null);
  6. }

Thanks, gonna try it now.

hmm getting

giverandomweapon does not exist in the current context and No overload for method Tell client takes two arguments
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#35
i dont have the source but its probably named differently lol
(XS4ALL/GoT2DayZ) DayZ Servers (http://got2dayz.nl)
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
http://fb.me/GoT2DayZ
  Reply
#36
ok got the source, here's my idea
also disables the plugin during gungame (would destroy the game)

start of the randomweaponmachine

CSHARP Code
  1. void weapz(Object arg)
  2. {
  3. Thread.Sleep(200);
  4. ServerClient Client = (ServerClient)arg;
  5. // magic trick to avoid running in infected and gungame (by: Pieter/JoSchaap)
  6. bool younoworkokay = false;
  7. String gametype = GetDvar("g_gametype");
  8. if (gametype == "gun")
  9. {
  10. younoworkokay = true;
  11. }
  12. if (gametype == "infect")
  13. {
  14. younoworkokay = false;
  15. if (Client.Team != Teams.Allies)
  16. {
  17. younoworkokay = true;
  18. }
  19. }
  20. if (younoworkokay != true)
  21. {
  22. // end of the trick: time to run the randomweapon-machine (also added a '}' at the end)
  23.  
  24. Client.Other.ClearPerks(); // Clear perks ffs
  25.  
  26. string[] AllSecondaries = {
  27.  
  28. // ........long list of random weapons blablabla
  29.  
  30. // ....... skipping to the end of the function to add a closing bracket
  31.  
  32. }
  33.  
  34.  
  35.  
  36. Ammoz(Client);
  37. } // added this } because of the trick to avoid giving infecteds weapons)
  38. }


Im posting this rather then replying, because im not a C# guru lol. i started learning Csharp when i registerred on itsmods Troll

so there might be a better way!
(XS4ALL/GoT2DayZ) DayZ Servers (http://got2dayz.nl)
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
http://fb.me/GoT2DayZ
[-] The following 2 users say Thank You to JoSchaap for this post:
  • DidUknowiPwn, hillbilly
  Reply
#37
worked a treat pieter, could you possibly add a choice of weapons for infected, ie: shield,smoke etc ? just so say some will spawn with a shield and some not. and smoke (always smoke)
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#38
that would mean completely rewriting it, i really dont have time for that atm
(XS4ALL/GoT2DayZ) DayZ Servers (http://got2dayz.nl)
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
[Image: b_350_20_2E3226_383F2D_D2E1B5_5A6C3E.png]
http://fb.me/GoT2DayZ
  Reply
#39
oh ok, thanks for what you have done anyway.
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#40
You saved a bunch of our time and debugging. Thanks a ton.. Now if this worked on 1.4 Dumb Bitch
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 964 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 980 11-08-2013, 19:13
Last Post: clemi555
  [Release] [SOURCE] Random Weapons. [HARD] Tony. 1 1,169 11-08-2013, 11:11
Last Post: Nekochan
  Help source random weapons [HARD] Tony. 4 719 11-08-2013, 05:25
Last Post: [HARD] Tony.
  [Release] Bunker Plugin 1.3 archit 68 12,390 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 1,231 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 1,079 10-19-2013, 06:59
Last Post: iRoNinja
Question Help Mw2 weapon skin question FroxIVx4 1 693 10-13-2013, 16:54
Last Post: hmann
Question Help Weapon Name iRoNinja 8 1,098 10-08-2013, 08:31
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 21,435 09-26-2013, 13:38
Last Post: First_Semyon

Forum Jump:


Users browsing this thread: 1 Guest(s)