ItsMods

Full Version: Juggernaut plugin for infected
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(12-01-2012, 22:52)koro35 Wrote: [ -> ]I have no model set for it as you can see in the code
there was a glitch with the model ill try and fix asap /tommorow

ok sorted that with @ [Z00MBY] Alex code mp_fullbody_ally_juggernaut

just need it to reset now when the jug gets killed
Aha I tryed that code, but then I couldn't be knived, I hope only I have this problem, and not other people Tongue.
And btw, you also need to do the hands for the look.
The model should automaticly reset since it gets a new model for the infected. And the bug with the knife i dont think is only us 99irock i think its for everyone
the jug can get knifed on mine ok.
i've tried a few combinations to view hands but none seem to work, any ideas?
Can you maybe post ur source for ur juggernaut, I Wanne see the differents between our code
(12-08-2012, 15:12)99IRock Wrote: [ -> ]Can you maybe post ur source for ur juggernaut, I Wanne see the differents between our code

This was for all players to use i even edited so infected could get 1, seems to go down well, i nulled out server print as it spammed the console. Also used the opforce Model for survivors and ally for infect.

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 PerkID = GetPerk("specialty_fastreload");
            int fjugg = GetWeapon("iw5_p99_mp");
            //Client.Other.PrimaryWeaponAkimbo = true;
            //Client.Other.SecondaryWeaponAkimbo = true;
            Client.Other.MaxHealth = 355;
            Client.Other.Health = 355;
            Client.Other.SetPlayerModel("mp_fullbody_opforce_juggernaut");
            int fjugg1 = GetWeapon("iw5_riotshieldjugg_mp");
            //Client.Ammo.SecondaryAmmoClip = 35;
            //Client.Ammo.SecondaryAmmo = 15;
            Client.Ammo.PrimaryAmmoClip = 45;
            Client.Ammo.PrimaryAmmo = 15;
            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 == "!jugg2")
                {
                    if (firstjugg == false)
                    {
                        JuggerFunc(Client);
                        return ChatType.ChatNone;
                    }
                    else if (firstjugg == true)
                    {
                        TellClient(Client.ClientNum, "^1Jugger already taken, ^3faster next time!", true);
                        return ChatType.ChatNone;
                    }
                }
            }
            else if (Client.Team == Teams.Axis)
            {
                if (Message == "!jugg2")
                {
                    TellClient(Client.ClientNum, "^1You can't have jugger!", true);
                    return ChatType.ChatNone;
                }
            }
            return ChatType.ChatContinue;
        }
    }
}
Use [code] tags.
(12-08-2012, 19:15)hillbilly Wrote: [ -> ]
(12-08-2012, 15:12)99IRock Wrote: [ -> ]Can you maybe post ur source for ur juggernaut, I Wanne see the differents between our code

This was for all players to use i even edited so infected could get 1, seems to go down well, i nulled out server print as it spammed the console. Also used the opforce Model for survivors and ally for infect.

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 PerkID = GetPerk("specialty_fastreload");
            int fjugg = GetWeapon("iw5_p99_mp");
            //Client.Other.PrimaryWeaponAkimbo = true;
            //Client.Other.SecondaryWeaponAkimbo = true;
            Client.Other.MaxHealth = 355;
            Client.Other.Health = 355;
            Client.Other.SetPlayerModel("mp_fullbody_opforce_juggernaut");
            int fjugg1 = GetWeapon("iw5_riotshieldjugg_mp");
            //Client.Ammo.SecondaryAmmoClip = 35;
            //Client.Ammo.SecondaryAmmo = 15;
            Client.Ammo.PrimaryAmmoClip = 45;
            Client.Ammo.PrimaryAmmo = 15;
            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 == "!jugg2")
                {
                    if (firstjugg == false)
                    {
                        JuggerFunc(Client);
                        return ChatType.ChatNone;
                    }
                    else if (firstjugg == true)
                    {
                        TellClient(Client.ClientNum, "^1Jugger already taken, ^3faster next time!", true);
                        return ChatType.ChatNone;
                    }
                }
            }
            else if (Client.Team == Teams.Axis)
            {
                if (Message == "!jugg2")
                {
                    TellClient(Client.ClientNum, "^1You can't have jugger!", true);
                    return ChatType.ChatNone;
                }
            }
            return ChatType.ChatContinue;
        }
    }
}

how could i add an extra jugg and only let each player use 1 jugg per map?
hey
can you release the plugin for your shop the plugin im using right now has major issues...
Pages: 1 2 3 4