Raised This Month: $12 Target: $400
 3% 

[TF2Items] Give Weapon (v3.14159, 11/29/2013)


Post New Thread Reply   
 
Thread Tools Display Modes
Sorrowfire
Member
Join Date: Jul 2010
Location: <Missing String>
Old 02-08-2011 , 21:01   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #211

Quote:
Originally Posted by FlaminSarge View Post
Also, heads up, do everything in the config for custom weapon stuff.
Editing the plugin itself makes it a pain to update.

Update is still in the works, b/c I left in a ton of buggy features that I need to comment out.
Well, it didn't even add the particle effect like i has guessed would happen. Fists or gunslinger, the particle has no bones to attach itself to and with no bones to attach too it just goes elsewhere...
(Are there any super small or invisible models i can set it to then? Since the index number is used for the bones that the particle attaches too)

Anyways, i like the idea of a whole Engi model with a team colored gunslinger.

As for Editing the plug-in itself, i have gotten used to the coding and i kinda like the extra work once and awhile.
Thanks again Sarge, its always nice to talk with you.

Ps: Try making a a flamethrower (Index and classname) with the iron Curtain model, it accatualy looks really cool and fits pretty well.
__________________
"What do you mean SourcePawn doesn't count as a 2nd language?"
Sorrowfire is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 02-09-2011 , 00:31   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #212

Even better: a blutsauger or lugermorph that is actually a tf_weapon_bat_fish.
Then set its fire rate attrib to .4 and its damage attrib to .01. Give it to everyone. Watch madness ensue.

Speaking of which, we finally have the "IMMA WHACK YOU WITH MY SHOT-" gun.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 02-09-2011 at 00:33.
FlaminSarge is offline
Night Fury
Junior Member
Join Date: Jul 2010
Old 02-10-2011 , 11:45   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #213

Hello!
Nice plugin ,but now Valve add 2 new weapons, why you don't add it in your plugin too? I wait for it long time ;D
__________________
My English HORROR! Excuse me for this GG
Night Fury is offline
peroxwhygen
BANNED
Join Date: Feb 2011
Old 02-10-2011 , 14:16   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #214

Hey sarge, I was interested by the whole sm_gimme thing you spoke about a few pages back, so I went into the code of this plugin, and after hours of testing and tons of headaches, I finally made a working sm_gimme command that doesn't require a name input.

Setting up the command
Code:
RegAdminCmd("sm_gimme", Command_Gimme, ADMFLAG_CUSTOM3, "Give Temporary Weapon sm_gimme <itemindex>");
Coding for the command
Code:
public Action:Command_Gimme(client, args)
{
    new String:arg2[32];
    new weaponLookupIndex = 0;
 
    if (args != 1) {
        ReplyToCommand(client, "[TF2Items] Usage: sm_gimme <itemindex>");
        return Plugin_Handled;
    }
    
    /* Get the arguments */
    GetCmdArg(1, arg2, sizeof(arg2));
    weaponLookupIndex = StringToInt(arg2);
    new weaponSlot;
    new String:formatBuffer[32];
    Format(formatBuffer, 32, "%d_%s", weaponLookupIndex, "slot");
    new bool:isValidItem = GetTrieValue(g_hItemInfoTrie, formatBuffer, weaponSlot);
    if (!isValidItem)
    {
        ReplyToCommand(client, "[TF2Items] Invalid Weapon ID");
        return Plugin_Handled;
    }
    if (!cvar_valveweapons && weaponLookupIndex > 9000)
    {
        ReplyToCommand(client, "[TF2Items] You're not an admin!");
        return Plugin_Handled;
    } 
    else
    {
        Command_WeaponBase(client, weaponLookupIndex, weaponSlot);        
        LogAction(client, client, "\"%L\" gave weapon %d to \"%L\"", client, weaponLookupIndex, client);
    }
     if (cvar_notify == 1 || cvar_notify == 2)
    {
        if (!cvar_valveweapons) {
            PrintToConsole(client, "[TF2Items] ", "Gave weapon %d!", weaponLookupIndex);
        } else {
            PrintToConsole(client, "[TF2Items] ", "Gave weapon %d!", weaponLookupIndex);
        }
    }
    else PrintToConsole(client, "[TF2Items] Gave weapon %d!", weaponLookupIndex);
    return Plugin_Handled;
}
Of course, you'll probably notice I used PrintToConsole. The reason I decided to do this, was for a friend of mine who just got his own server. And he had specific requests for the command, which were:

- He didn't want messages appearing in chat
- He wanted donators to be able to use the command
- He didn't want his donators being able to access any weapons with ID's over 9000

Also, I didn't know if I could use "if" by itself, which is why I did this:
Code:
        if (!cvar_valveweapons) {
            PrintToConsole(client, "[TF2Items] ", "Gave weapon %d!", weaponLookupIndex);
But hey, the command works perfectly, though I haven't checked my error logs yet. So whaddya think?

Last edited by asherkin; 02-10-2011 at 14:39.
peroxwhygen is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 02-10-2011 , 18:05   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #215

Pretty nice. I'm actually making a separate plugin that has some more cvars and maybe a menu, for sm_gimme, so that players can unload the gimme command at will, set flags through convars, etc.
It'll use the GiveWeapon native, but will make the plugin programming a lot cleaner (Command_Gimme will be about 20 less lines than if it were up there)

Also that place where you were wondering about the if, was just for translation checking. You can just make it one line, removing the second PrintToConsole and the if/else

Sit tight for sm_gimme.

@Night Fury, I did, I need to update this plugin, but I'm really busy until March :C
Will try to update when I can.

There's a list of the features I added, a few posts back.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 02-10-2011 at 18:08.
FlaminSarge is offline
KBL15
New Member
Join Date: Feb 2011
Old 02-10-2011 , 18:09   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #216

Hey FlaminSarge can u help me out? I downloaded everything but I am not sure If I installed it correctly. Also can I use on offline practice?
KBL15 is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 02-10-2011 , 20:49   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #217

... I'm not entirely sure if that question is actually a question, KBL15.

If you installed SourceMod and the TF2Items extension on your local TF2 Installation, you'll need to rightclick TF2, open up its Settings, find Launch Properties, and add -insecure, in order to use SourceMod on your local TF2. This will disable your VAC, so you will have to remove it in order to play on all VAC servers. I believe it will work in offline practice, but -insecure is a bad idea.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
steryman
Member
Join Date: May 2010
Old 02-11-2011 , 05:35   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #218

how can I make it so it will give me a weapon as I join the server?
steryman is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 02-11-2011 , 21:05   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #219

steryman:
You mean autogive on join? Uh...
I don't know. Probably not possible with this plugin yet.
Unless you somehow auto sm_givew_ex "steryman" 159 on join or something.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
steryman
Member
Join Date: May 2010
Old 02-12-2011 , 10:12   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #220

Yea that's what I mean... like on saings.de servers with premium account with golden wrench and others... I think the premium accounts automatically gets weapons on join.
steryman is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode