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

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


Post New Thread Reply   
 
Thread Tools Display Modes
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-03-2011 , 05:37   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #501

sm_gimme was coded a while back but I had trouble determining what system I used for how to disable sm_gimme while still using giveweapon, or vice versa.

I'll add it in soon.

I also already said what I'm doing to sm_resetex:
sm_resetex <target> <"slot" or "index"> <slot/index number>
Therefore you can reset both all of 1 weapon or all of a slot. You can also do sm_resetex target index 1 44 23 293
(same for slot, which goes from 0 to 5)
and this accepts up to 32 indices/slots
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 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
ddog123456
Junior Member
Join Date: Sep 2011
Old 09-03-2011 , 15:33   I can not figure out how to get the items visible
Reply With Quote #502

How can i get the items to be visible to all players. Please help me
ddog123456 is offline
GoRRageBoy
BANNED
Join Date: Jul 2011
Old 09-03-2011 , 16:05   Re: I can not figure out how to get the items visible
Reply With Quote #503

Quote:
Originally Posted by ddog123456 View Post
How can i get the items to be visible to all players. Please help me
As said in this thread within the last few pages, only stock weapon models will be visible to everyone, so you can use any of the stock weapons (from ID 0, aka the Scout's Bat, all the way to ID 30...I think, which is the Spy's Invis Watch).

Any other weapons after the Spy's stock Invis Watch won't be visible.


Quote:
Originally Posted by FlaminSarge View Post
sm_gimme was coded a while back but I had trouble determining what system I used for how to disable sm_gimme while still using giveweapon, or vice versa.

I'll add it in soon.
Couldn't you do some sort of system similar to the Valve weapons thing, but make it cover every possible ID so that if the CVAR is set to 1, anyone who uses sm_gimme on any ID won't be able to give themselves a weapon?

Quote:
Originally Posted by FlaminSarge View Post
I also already said what I'm doing to sm_resetex:
sm_resetex <target> <"slot" or "index"> <slot/index number>
Therefore you can reset both all of 1 weapon or all of a slot. You can also do sm_resetex target index 1 44 23 293
(same for slot, which goes from 0 to 5)
and this accepts up to 32 indices/slots
Ahhh, so basically you could do "sm_resetex @me <slot>", without any index? Cool.
GoRRageBoy is offline
ddog123456
Junior Member
Join Date: Sep 2011
Old 09-03-2011 , 16:49   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #504

ok, so how do you give someone a weapon permanently even when they leave the server.

Last edited by ddog123456; 09-03-2011 at 16:52.
ddog123456 is offline
GoRRageBoy
BANNED
Join Date: Jul 2011
Old 09-03-2011 , 16:59   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #505

Quote:
Originally Posted by ddog123456 View Post
ok, so how do you give someone a weapon permanently even when they leave the server.
Can't be done without some sort of SQL/Clientprefs setup, I assume.

Mecha's Advanced Weaponiser has the ability to re-equip weapons on someone if they leave and rejoin, but this plugin doesn't.
GoRRageBoy is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-03-2011 , 19:26   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #506

I suppose I could implement clientprefs, but why? Have you guys seen TF2 Auto Items Manager by Leonardo? I believe it lets you do that (if you run both, you could essentially give a player a weapon here, then add it to the database on auto items manager so that they get it later. I'm not sure how, but probably). This plugin is generally for on-command stuff, as well as Leo's Bot Weapon Randomizer.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 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; 09-03-2011 at 19:31.
FlaminSarge is offline
GoRRageBoy
BANNED
Join Date: Jul 2011
Old 09-04-2011 , 01:29   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #507

What would really be cool would be implementing a Steam ID string in the custom weapons TXT as well as the plugin, so that admins can specify a Steam ID of a player so only that specific player could use the weapon.

And a menu system would be cool too, which would tie into the sm_gimme idea, as well as use the possible "sm_resetex @me <slot>" command.

You could do something similar to the advanced weaponiser's menu system, only there would be a remove menu, and it would consist of:

"Remove Primary Weapon"
"Remove Secondary Weapon"
"Remove Melee Weapon"
"Remove PDA"
"Remove PDA2"
"Remove <whatever the Spies disguise kit is"

And each selection would run a client command of "sm_resetex @me <slot>"

Menu system isn't a priority, I suppose, but having a Steam ID thing (like you have in your Model Manager plugin) would be great.
GoRRageBoy is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-04-2011 , 08:06   Re: I can not figure out how to get the items visible
Reply With Quote #508

Quote:
Originally Posted by GoRRageBoy View Post
As said in this thread within the last few pages, only stock weapon models will be visible to everyone, so you can use any of the stock weapons (from ID 0, aka the Scout's Bat, all the way to ID 30...I think, which is the Spy's Invis Watch).

Any other weapons after the Spy's stock Invis Watch won't be visible.
And only visible on the class that uses it.

Quote:
Couldn't you do some sort of system similar to the Valve weapons thing, but make it cover every possible ID so that if the CVAR is set to 1, anyone who uses sm_gimme on any ID won't be able to give themselves a weapon?
Probably.
Quote:
Ahhh, so basically you could do "sm_resetex @me <slot>", without any index? Cool.
No, you can either do sm_resetex <target> for resetting all a client's weapons, sm_resetex <target> "slot" <slotnumber> for resetting slot, or
sm_resetex <target> "index" <index> for resetting an index. The words slot and index don't need quotes.

I'm still trying to perfect that system, but it seems to be working ok for what it's got in it right now.

I can try the steamid and menu stuff.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 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
GoRRageBoy
BANNED
Join Date: Jul 2011
Old 09-04-2011 , 17:02   Re: I can not figure out how to get the items visible
Reply With Quote #509

Quote:
Originally Posted by FlaminSarge View Post
I can try the steamid and menu stuff.
Neat. For the Steam ID stuff, I'd do something like this (keep in mind this example doesn't use actual coding, it's just a simple example)

PHP Code:
if (weapon has steam id field)
{
    if (
weapons steam id matches players steam id)
    {
        
GivePlayerTheWeapon();
    }
    else
    {
        
PrintToChat(client"This weapon isn't for you");
    }

But yeah, ignore the fake if statements and what not. You should get the idea of what I'm trying to suggest

Of course, if the Steam ID thing gets implemented, you'll have to add coding for the menus that checks a player's Steam ID and adds any weapons that have their Steam ID listed as the "steamid" field, to the proper slot, and for the proper class.

And that's another thing I forgot to mention. Adding a "class" field for the weapons would be nice so we could specify which class a weapon is for, so other classes can't use it, plus it'd allow you to set up class-based menus.

But we run into the issue of weapons that multiple classes can use, such as the Pain Train, Half-Zatoichi, Lugermorph, etc. Maybe the option of doing:

"class" "SOLDIER, SCOUT"

And have some defines set up like so:

#define SOLDIER TFClass_Soldier
#define SCOUT TFClass_Scout
GoRRageBoy is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-04-2011 , 17:45   Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
Reply With Quote #510

I'll see. In the meantime, I'm going to work on having weapons that are shared between classes use the proper taunts. For instance, if I give the scout's pistol (index 22) to the engineer, he can't taunt with it.

I already did it in randomizer for the Family Business and the Reserve Shooter, and it's working pretty well, but I'm going to try a different method.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 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
Reply


Thread Tools
Display Modes

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 04:40.


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