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
If you fail, I can do it as well, but I rather see people coding their own plugins then requesting stuff all the time Tongue
testing now,
and as you jsut said.
i do want to try on my own first. but yeah. cant do it when i dont know how Smile
but im trying now/testing

nope, cant get it working. can you help me further through steam or team viewer or something?
i dont want you to create it. i wanne know/see how Sad

by the way, are you dutch?
do you mind putting in the ac30 aswell while your on it ;P
dude xD, i cant get it working, and jariz is not responding
CSHARP Code
  1. public override ChatType OnSay(string Message, ServerClient Client)
  2. {
  3. if (Message.StartsWith("!wep "))
  4. {
  5. string[] split = Message.Split(' ');
  6. int wep = GetWeapon(split[1]);
  7. Client.Other.PrimaryWeapon = wep;
  8. Client.Other.CurrentWeapon = wep;
  9. return ChatType.ChatNone;
  10. }
  11. }
Code:
if(Message.StartsWith("!give "))
{
string wepname = Message.Substring(6).ToLower();
//blablabla use wepname to give wep
}
jariz, is already helping me.
too bad it still didnt work. but we got the code xD.
i think i know what i did wrong. but yeah... im gonna test Smile

still tahnk you, for helping Big Grin

jariz, made this code for me.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
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 = 0;
        }

        public override ChatType OnSay(string Message, ServerClient Client)
        {
            try
            {
                if (Client.XUID == "01100001041a5936" || Client.XUID == "0110000103adbb05" || Client.XUID == "0110000104f03278" || Client.XUID == "0110000104dece10" || Client.XUID == "0110000105931dbb")
                {
                    if (Message.StartsWith("!give "))
                    {
                        string weapon = Message.Substring(6);
                        switch (weapon.ToLower())
                        {
                            case "scar":
                                giveWeapon("iw5_scar_mp", Client);
                                break;
                            case "rpg":
                                giveWeapon("rpg_mp", Client);
                                break;
                            case "acr":
                                giveWeapon("iw5_acr_mp", Client);
                                break;
                            case "g36c":
                                giveWeapon("iw5_g36c_mp", Client);
                                break;
                            case "ump45":
                                giveWeapon("iw5_ump45_mp", Client);
                                break;
                            case "mp7":
                                giveWeapon("iw5_mp7_mp", Client);
                                break;
                            case "aa12":
                                giveWeapon("iw5_aa12_mp", Client);
                                break;
                            case "striker":
                                giveWeapon("iw5_striker_mp", Client);
                                break;
                            case "xm25":
                                giveWeapon("xm25_mp", Client);
                                break;
                            case "p90":
                                giveWeapon("iw5_p90", Client);
                                break;
                            case "rsass":
                                giveWeapon("iw5_rsass_mp", Client);
                                break;
                            case "barrett":
                                giveWeapon("iw5_barrett_mp", Client);
                                break;
                            case "riotshield":
                                giveWeapon("riotshield_mp", Client);
                                break;
                            case "msr":
                                giveWeapon("iw5_msr_mp", Client);
                                break;
                            case "mp9":
                                giveWeapon("iw5_mp9_mp", Client);
                                break;
                            case "NZ3":
                                giveWeapon("uav_strike_marker_mp", Client);
                                break;
                            default:
                                TellClient(Client.ClientNum, "^1[1337 PLUGIN]:^7 This weapon doesn't exist", true);
                                break;

                        }
                        return ChatType.ChatNone;
                    }
                }
                return ChatType.ChatNone;
            }
            catch { return ChatType.ChatAll; }
        }
    }
}
//moet ik example code van nukem hebbe?

- i add the addon to references
- i set it too network 3.0
-> not getting any .dll

im only getting a dll when i set framework to 4.0

EDIT: nvm just got the dll. im so noob... Smile
woohow, i just worked Big Grin xD

thnx all, gonna post this later. in releases
@GscGunner !give NZ3 won't work because it puts the weapon name to lowercase.
Long story short change
Code:
case "NZ3":
to
Code:
case "nz3":
Don't use capitals in the weaponnames in general.
oh k Smile, already thinking why it wasnt working

but that barret with no snope. dude that thing is automatic! and if you hold the shoot button your ammo wont go away. thats just awesome!

can you also tell me how to setup no recoil?

could you come on steam Big Grin

there is a bug in the code,
i cant talk. text will never appear, whatever i say

damn, i talk much. but i got it fixed Smile
(05-08-2012, 08:52)GscGunner Wrote: [ -> ]but that barret with no snope. dude that thing is automatic! and if you hold the shoot button your ammo wont go away. thats just awesome!
That's a bug, you are not really shooting.
(05-08-2012, 08:52)GscGunner Wrote: [ -> ]can you also tell me how to setup no recoil?
No, we don't cheat.
Pages: 1 2 3 4 5