• 3 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[source] vAmpIr
#1
Creator: @JariZ and @[ZOOMBY] Alex

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Addon;
  5. using System.Threading;
  6. namespace vampPlus
  7. {
  8. public class vampPlus : CPlugin
  9. {
  10.  
  11. bool _isthreadrunning = true;
  12.  
  13. public override void OnServerLoad()
  14. {
  15. ServerPrint("vampPlus plugin by Litgar loaded! thx JariZ for source code");
  16. }
  17.  
  18. public override void OnPlayerSpawned(ServerClient Client)
  19. {
  20. if (Client.XUID == " YOU HUID" && Client.Name == "YOU NAME")
  21. {
  22. _isthreadrunning = true;
  23. dovamp(Client);
  24. }
  25. }
  26. void dovamp(ServerClient Client)
  27. {
  28. ThreadPool.QueueUserWorkItem(new WaitCallback(loadmedic), Client);
  29. }
  30.  
  31. public static float Difference(float loc, float loc2)
  32. {
  33. return Math.Abs(loc - loc2);
  34. }
  35.  
  36.  
  37. public static Teams CalculateOtherTeam(ServerClient Client)
  38. {
  39. Teams otherteam;
  40. if (Client.Team == Teams.Allies) otherteam = Teams.Axis;
  41. else if (Client.Team == Teams.Axis) otherteam = Teams.Allies;
  42. else otherteam = Teams.FFA;
  43. return otherteam;
  44. }
  45.  
  46.  
  47. public virtual bool IsThreadRunning
  48. {
  49. get
  50. {
  51. return _isthreadrunning;
  52. }
  53. set
  54. {
  55. _isthreadrunning = value;
  56. }
  57. }
  58. /*
  59.   public static void SafeSleep(int AmountSec, vampPlus roll)
  60.   {
  61.   int total = 0;
  62.   while (total != AmountSec)
  63.   {
  64.   total++;
  65.   if (!roll.IsThreadRunning)
  66.   break;
  67.   else Thread.Sleep(1000);
  68.   }
  69.  
  70.   }
  71.   */
  72. void loadmedic(Object arg)
  73. {
  74. Thread.Sleep(500);
  75. try
  76. {
  77. ServerClient client = (ServerClient)arg;
  78. iPrintLnBold("^2Вампир АКТИВИРОВАН!", client);
  79.  
  80. while (IsThreadRunning)
  81. {
  82. foreach (ServerClient otherclient in GetClients())
  83. {
  84. int removehp = 20;
  85.  
  86.  
  87.  
  88. if ((Difference(client.OriginY, otherclient.OriginY) <= 200) && (Difference(client.OriginX, otherclient.OriginX) <= 200) && otherclient.Team == CalculateOtherTeam(client))
  89. {
  90.  
  91. if (otherclient.Other.Health <= 30) continue;
  92.  
  93. iPrintLnBold("^3" + client.Name + " ^1забрал у Вас " + removehp + " HP!", otherclient);
  94. iPrintLnBold("^2Вы забрали ^1" + removehp + " HP^2 у игрока " + otherclient.Name + "!", client);
  95. otherclient.Other.Health = otherclient.Other.Health - removehp;
  96. client.Other.Health = client.Other.Health + removehp;
  97. }
  98.  
  99.  
  100.  
  101.  
  102. }
  103.  
  104. /*
  105.   SafeSleep(2, this);
  106.   */
  107. Thread.Sleep(1000);
  108.  
  109. }
  110. }
  111. catch { }
  112. }
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119. public override void OnPlayerConnect(ServerClient Client)
  120. {
  121.  
  122.  
  123.  
  124. }
  125. public override void OnPlayerDisconnect(ServerClient Client)
  126. {
  127.  
  128.  
  129.  
  130. }
  131.  
  132.  
  133.  
  134. }
  135. }
:S
[Image: 6iiLEmPSEm0.jpg]
skype egor2398los
  Reply
#2
You haven't asked authors. Retarded.
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply
#3
(07-25-2013, 11:04)SailorMoon Wrote: You haven't asked authors. Retarded.

I don't think this is decompiled code? There is a comment.
  Reply
#4
(07-25-2013, 14:53)kokole Wrote:
(07-25-2013, 11:04)SailorMoon Wrote: You haven't asked authors. Retarded.

I don't think this is decompiled code? There is a comment.

Maybe he just added it?
Anyways, delete this thread, because he haven't asked authors.
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply
#5
using System.Threading;

Fail
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

[-] The following 1 user says Thank You to hillbilly for this post:
  • E-losev
  Reply
#6
I think its from pastebin too

Sent from my E16i using Tapatalk 2
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Release] [SOURCE] Random Weapons. [HARD] Tony. 1 2,301 11-08-2013, 11:11
Last Post: Nekochan
  Help source random weapons [HARD] Tony. 4 2,222 11-08-2013, 05:25
Last Post: [HARD] Tony.
  [Request] Health and Points on hud source robinvm 7 2,709 10-27-2013, 08:23
Last Post: robinvm
  [Release] [SOURCE] DOOR V2.0 [HARD] Tony. 5 2,907 09-26-2013, 14:01
Last Post: Nekochan
  [source] medic E-losev 6 2,728 07-26-2013, 06:18
Last Post: E-losev
  [Release] Barata's REAL External Console Source C# barata 37 11,364 06-28-2013, 23:47
Last Post: barata
  [Release] Shoutbot + source JariZ 11 3,075 04-05-2013, 18:15
Last Post: SuperNovaAO
Rainbow [News] Valve strikes again (Source Filmmaker) estebespt 25 6,109 04-05-2013, 18:15
Last Post: SuperNovaAO
  MapEdit Source archit 0 1,936 03-28-2013, 12:06
Last Post: archit
  [email protected] Promod Source Files? koil 1 1,285 01-11-2013, 15:12
Last Post: Pozzuh

Forum Jump:


Users browsing this thread: 1 Guest(s)