12-01-2012, 14:02
Hello guys i am releasing the CraftBang Juggernaut plugin for your mw3 infected server.
Credits:
Reckless(me): Coding
KungFu: Help with code
RedRum(99iRock): Idea of plugin
COMMANDS:
!juggernaut (to get juggernaut)
NOTE: ONLY ONE SURVIVOR CAN GET IT (resets on map change)
INFO:
As juggernaut you get 180 health
p99 pistol
riotshield
Full source (because i am nice):
Credits:
Reckless(me): Coding
KungFu: Help with code
RedRum(99iRock): Idea of plugin
COMMANDS:
!juggernaut (to get juggernaut)
NOTE: ONLY ONE SURVIVOR CAN GET IT (resets on map change)
INFO:
As juggernaut you get 180 health
p99 pistol
riotshield
Full source (because i am nice):
Spoiler (Click to View)
CSHARP Code
- using System;
- using Addon;
- using System.Timers;
-
- namespace plugin_test
- {
- //" : CPlugin" is needed to inherit the functions
- public class plugin_test : CPlugin
- {
- //VARIABLES
- bool firstjugg = false;
- //
- public override void OnMapChange()
- {
- firstjugg = false;
- }
-
- public override void OnServerLoad()
- {
- ServerPrint("Juggernaut by Reckless/koro35 and RedRum/Irock loaded");
- }
-
- public void JuggerFunc(ServerClient Client)
- {
- iPrintLnBold("^1|" + Client.Name + " Got juggernaut|", null);
- int fjugg = GetWeapon("riotshield_mp");
- Client.Other.MaxHealth = 180;
- Client.Other.Health = 180;
- int fjugg1 = GetWeapon("iw5_p99_mp_silencer");
- Client.Ammo.SecondaryAmmoClip = 35;
- Client.Ammo.SecondaryAmmo = 10;
- Client.Other.PrimaryWeapon = fjugg;
- Client.Other.CurrentWeapon = fjugg;
- Client.Other.CurrentWeapon = fjugg1;
- Client.Other.SecondaryWeapon = fjugg1;
- firstjugg = true;
- }
-
-
-
- public override ChatType OnSay(string Message, ServerClient Client)
- {
- ServerPrint("Player " + Client.Name + "said " + Message);
- if (Client.Team == Teams.Allies)
- {
- if (Message == "!juggernaut")
- {
- if (firstjugg == false)
- {
- JuggerFunc(Client);
- return ChatType.ChatNone;
- }
- else if (firstjugg == true)
- {
- TellClient(Client.ClientNum, "^1Jugger already taken!", true);
- return ChatType.ChatNone;
- }
- }
- }
- else if (Client.Team == Teams.Axis)
- {
- if (Message == "!juggernaut")
- {
- TellClient(Client.ClientNum, "^1You cant have jugger!", true);
- return ChatType.ChatNone;
- }
- }
- return ChatType.ChatContinue;
- }
- }
- }