ItsMods

Full Version: !get <weapon> help?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
lolol,
ok xD

ok the !give weapons for admins is perfect,

im trying to make, it that everybody can choose between a few shotguns, i got it working.
too bad, infected can then also get shotguns. and thats not what i ofcourse want.

how do i set it up that only survivors can get the guns.

thank you.
anybody Big Grin?
can you send me the dll
ill send you source

source
i got a code of jariz for only for team.allies. but it didnt work, i left it in the code for u
Code:
using System;
using System.Collections.Generic;
using System.Text;
using Addon;

namespace kaas
{
    public class Class1 : CPlugin
    {
        public void giveWeapon(string wep, ServerClient client)
        {
            int wepID = GetWeapon(wep);
            client.Other.PrimaryWeapon = wepID;
            client.Other.CurrentWeapon = wepID;
            client.Ammo.PrimaryAmmoClip = 241;
            client.Ammo.PrimaryAmmo = 80;
        }

        public override ChatType OnSay(string Message, ServerClient Client)
        {

            {
                if (Client.Team == Teams.Allies)
                {
                    if (Message.StartsWith("!give "))
                    {
                        string weapon = Message.Substring(6);
                        switch (weapon.ToLower())
                        {
                            //case "aa12":
                            //    giveWeapon("iw5_aa12r_mp", Client);
                            //    break;
                            case "striker":
                                giveWeapon("iw5_striker_mp", Client);
                                ServerSay("^7Striker granted to ^3" + Client.Name + "", true);
                                break;
                            case "ksg12":
                                giveWeapon("iw5_ksg_mp", Client);
                                ServerSay("^7Ksg granted to ^3" + Client.Name + "", true);
                                break;
                            case "spas12":
                                giveWeapon("iw5_spas12_mp", Client);
                                ServerSay("^7Spas 12 granted to ^3" + Client.Name + "", true);
                                break;
                            case "usas12":
                                giveWeapon("iw5_usas12_mp", Client);
                                ServerSay("^7Usas 12 granted to ^3" + Client.Name + "", true);
                                break;
                            default:
                                TellClient(Client.ClientNum, "", true);
                                break;

                        }
                        return ChatType.ChatAll;

                    }
                }
                return ChatType.ChatAll;
            }

        }
    }
}
Code:
default:
                                TellClient(Client.ClientNum, "", true);
lolwat
hmm, didnt remember iremoved that??? ?_? lololol
change
Code:
if (Client.Team == Teams.Allies)
                {
                    if (Message.StartsWith("!give "))
                    {

to
Code:
if (Message.StartsWith("!give "))
                    {
if (Client.Team == Teams.Allies)
                {
MW3 just got updated, cant fucking test >_< >_< >_<
im now at school, as soon im home. i'll update addon and shit.
and give you guys the source and dll. of the plugin that actually @JariZ made.
Hey,

Is this still working and can you release the .dll only or with the source code and with all weapons?
(10-16-2012, 15:52)jari333 Wrote: [ -> ]Hey,

Is this still working and can you release the .dll only or with the source code and with all weapons?

Use PM for this.
Pages: 1 2 3 4 5