• 4 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release 8Q's Server Addon Extension
#1
Because I suck at c++ and wasn't able to update the addon I decided to create a addon extension in c#. I added everything that I found to it, it also contains the stuff that I released earlier like teamcounter or gamespeed.
This plugin only works for server version 1.9.461

Functions

class: Set
CSHARP Code
  1. void NoClip (int ClientNum, NoClipType nocliptype) // I added that because I found a second noclip
  2. void MapOnScreen (int ClientNum, bool activate) // enables/disables map on screen
  3. void GameSpeed (int GameSpeed) // changing gamespeed
  4. void ScreenRotation (int ClientNum, float value) // rotation the screen of the selected player
  5. void MouseX (int ClientNum, float value) // changing the mouse location of the player
  6. void MouseY (int ClientNum, float value) // changing the Y axis
  7. void Name (int ClientNum, string Name) // changing the name of the player, colors are working too


class: Get
CSHARP Code
  1. bool MapOnScreen (int ClientNum) // returns true = enabled, false = disabled
  2. int TeamScore (_Team team) // returning the score of the selected team (should work for every gametype)
  3. NoClipType NoClip (int ClientNum) // returns the players nocliptype
  4. int GameSpeed () // returns the gamespeed
  5. float MouseX (int ClientNum) // returns mouseX value
  6. float MouseY (int ClientNum) // returns MouseY value
  7. List<ServerClient> Allies () // returns list of players in team allies
  8. List<ServerClient> Axis () // returns list of players in team axis
  9. ServerClient GetLastAlive () // returns last alive(for infected) or null
  10. int Count (_Team team) // returns the amount of players in the team
  11. float ScreenRotation (int ClientNum) // returns screenrotation


How to use
add the .dll as a reference to your plugin
namespace: Extension8Q
report any bugs

Examples of what you can create with it:

AimbotMe Gusta

Bunker Builder


Credits
@8q4s8 - creator
@Nukem - awesome addon Awesome
Thanks to everyone who helped me with testing

EDIT: updated download, the old one caused some problems because of the obfuscation


Attached Files
.zip   Extension8Q.zip (Size: 17.23 KB / Downloads: 166)
[-] The following 11 users say Thank You to 8q4s8 for this post:
  • archit, barata, Dr3am95, EnVi Sweden Rocks, Nekochan, Nukem, NyZzE, Pozzuh, surtek, X-Track, xfxtroll
  Reply
#2
updated, I added
CSHARP Code
  1. void Set.Name (int ClientNum, string Name)

you can use colored names too (Set.Name(Client.ClientNum, "^1myname")Wink

here's the code of the bunker builder that i used for testing (requested by @ltybcs)

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using Addon;
  4. using System.Text;
  5. using Extension8Q;
  6. using System.Timers;
  7.  
  8. namespace ClassLibrary1
  9. {
  10. public class Class1:CPlugin
  11. {
  12. bool activated = false;
  13. Timer timer = new Timer();
  14. Timer timer2 = new Timer();
  15. Vector vec;
  16. ServerClient client;
  17. Entity spawn;
  18. int i = 75;
  19.  
  20. public override ChatType OnSay(string Message, ServerClient Client)
  21. {
  22. if (Message == "!activate")
  23. {
  24. activated = !activated;
  25. client = Client;
  26. return ChatType.ChatNone;
  27. }
  28. return ChatType.ChatContinue;
  29. }
  30.  
  31. public override void OnServerLoad()
  32. {
  33. timer.Elapsed += new ElapsedEventHandler(handler);
  34. timer.Interval = 500;
  35. timer.Enabled = true;
  36.  
  37. timer2.Elapsed += new ElapsedEventHandler(handler2);
  38. timer2.Interval = 10;
  39. timer2.Enabled = true;
  40. }
  41.  
  42. public void handler(object s, ElapsedEventArgs e)
  43. {
  44. if (activated)
  45. {
  46. if (client.Other.ButtonPressed(Buttons.Activate))
  47. {
  48. Entity ent = SpawnModel("script_model", "com_plasticcase_trap_friendly", vec);
  49. Extensions.CloneBrushModelToScriptModel(ent, Extensions.FindAirdropCrateCollisionId());
  50. }
  51. }
  52. }
  53. public void handler2(object s,ElapsedEventArgs e)
  54. {
  55. if (activated)
  56. {
  57. if (client.Other.ButtonPressed(Buttons.Equipment))
  58. {
  59. i = i - 1;
  60. }
  61. if (client.Other.ButtonPressed(Buttons.ADS))
  62. {
  63. i = i + 1;
  64. }
  65. float x1 = client.OriginX + i * (float)Math.Cos(Get.MouseX(client.ClientNum) * (Math.PI / 180));
  66. float y1 = client.OriginY + i * (float)Math.Sin(Get.MouseX(client.ClientNum) * (Math.PI / 180));
  67. vec = new Vector(x1, y1, client.OriginZ + 50 - (Get.MouseY(client.ClientNum)*2));
  68. if (spawn == null)
  69. {
  70. spawn = SpawnModel("script_model", "com_plasticcase_trap_friendly", vec);
  71. }
  72. else
  73. {
  74. spawn.OriginX = vec.X;
  75. spawn.OriginY = vec.Y;
  76. spawn.OriginZ = vec.Z;
  77. }
  78. }
  79. else
  80. {
  81. spawn.Delete();
  82. spawn = null;
  83. }
  84. }
  85. }
  86. }
[-] The following 2 users say Thank You to 8q4s8 for this post:
  • Hallla, ltybcs
  Reply
#3
Good job.
[Image: MaEIQ.png]
[-] The following 1 user says Thank You to Pozzuh for this post:
  • 8q4s8
  Reply
#4
Nice... but is SetName bannable? ( Do you use address of CVar .. ? )... because it is RO dvar, you can get banned.
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply
#5
(07-09-2013, 20:37)SailorMoon Wrote: Nice... but is SetName bannable? ( Do you use address of CVar .. ? )... because it is RO dvar, you can get banned.

I'm pretty sure you can't get banned or the chances are very low, I'm using this in my server for quite a while and no one got banned so far.
[-] The following 1 user says Thank You to 8q4s8 for this post:
  • E-losev
  Reply
#6
(07-09-2013, 16:36)8q4s8 Wrote: updated, I added
CSHARP Code
  1. void Set.Name (int ClientNum, string Name)

you can use colored names too (Set.Name(Client.ClientNum, "^1myname")Wink

here's the code of the bunker builder that i used for testing (requested by @ltybcs)

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using Addon;
  4. using System.Text;
  5. using Extension8Q;
  6. using System.Timers;
  7.  
  8. namespace ClassLibrary1
  9. {
  10. public class Class1:CPlugin
  11. {
  12. bool activated = false;
  13. Timer timer = new Timer();
  14. Timer timer2 = new Timer();
  15. Vector vec;
  16. ServerClient client;
  17. Entity spawn;
  18. int i = 75;
  19.  
  20. public override ChatType OnSay(string Message, ServerClient Client)
  21. {
  22. if (Message == "!activate")
  23. {
  24. activated = !activated;
  25. client = Client;
  26. return ChatType.ChatNone;
  27. }
  28. return ChatType.ChatContinue;
  29. }
  30.  
  31. public override void OnServerLoad()
  32. {
  33. timer.Elapsed += new ElapsedEventHandler(handler);
  34. timer.Interval = 500;
  35. timer.Enabled = true;
  36.  
  37. timer2.Elapsed += new ElapsedEventHandler(handler2);
  38. timer2.Interval = 10;
  39. timer2.Enabled = true;
  40. }
  41.  
  42. public void handler(object s, ElapsedEventArgs e)
  43. {
  44. if (activated)
  45. {
  46. if (client.Other.ButtonPressed(Buttons.Activate))
  47. {
  48. Entity ent = SpawnModel("script_model", "com_plasticcase_trap_friendly", vec);
  49. Extensions.CloneBrushModelToScriptModel(ent, Extensions.FindAirdropCrateCollisionId());
  50. }
  51. }
  52. }
  53. public void handler2(object s,ElapsedEventArgs e)
  54. {
  55. if (activated)
  56. {
  57. if (client.Other.ButtonPressed(Buttons.Equipment))
  58. {
  59. i = i - 1;
  60. }
  61. if (client.Other.ButtonPressed(Buttons.ADS))
  62. {
  63. i = i + 1;
  64. }
  65. float x1 = client.OriginX + i * (float)Math.Cos(Get.MouseX(client.ClientNum) * (Math.PI / 180));
  66. float y1 = client.OriginY + i * (float)Math.Sin(Get.MouseX(client.ClientNum) * (Math.PI / 180));
  67. vec = new Vector(x1, y1, client.OriginZ + 50 - (Get.MouseY(client.ClientNum)*2));
  68. if (spawn == null)
  69. {
  70. spawn = SpawnModel("script_model", "com_plasticcase_trap_friendly", vec);
  71. }
  72. else
  73. {
  74. spawn.OriginX = vec.X;
  75. spawn.OriginY = vec.Y;
  76. spawn.OriginZ = vec.Z;
  77. }
  78. }
  79. else
  80. {
  81. spawn.Delete();
  82. spawn = null;
  83. }
  84. }
  85. }
  86. }

hey i wanted make your Bunker Plugin, but idk how to Tongue , can you pls upload yours? i tried it the whole week but it dont work so pls upload it ;D?
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Release] Windows 8.1 Fix for MW3 Server Addon master131 16 10,625 09-29-2014, 23:08
Last Post: SuperNovaAO
Brick [Release] MW3 Server Administration Addon iRoNinja 5 5,484 11-10-2013, 15:46
Last Post: Casper
Exclamation Help cmdlist, dvarlist server crash Nerus 17 5,634 11-09-2013, 23:54
Last Post: Nerus
  Hosting With Addon obliviron 9 3,914 11-04-2013, 22:13
Last Post: d0h!²
  Our Level Fastfile is Different from the Server. CheeseToast 6 3,396 11-03-2013, 17:52
Last Post: CheeseToast
  Dedicated Server External (public) IP Nerus 3 3,197 11-02-2013, 14:16
Last Post: Casper
  MW3 Server Version superg1973 7 7,900 10-28-2013, 01:15
Last Post: kotyra972
  Help how to turn off map in dedicated server pero123 8 3,383 10-15-2013, 19:00
Last Post: Nekochan
  Issue with server addon and NAT dimitrifrom31 3 2,218 10-08-2013, 18:11
Last Post: iRoNinja
  [Release] CS addon for MW2(Sounds,show damage) Fl0w_.JACKDAN 1 2,477 09-29-2013, 19:46
Last Post: Nekochan

Forum Jump:


Users browsing this thread: 1 Guest(s)