AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2Items] Give Weapon (v3.14159, 11/29/2013) (https://forums.alliedmods.net/showthread.php?t=141962)

FlaminSarge 09-03-2011 05:37

Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
 
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

ddog123456 09-03-2011 15:33

I can not figure out how to get the items visible
 
How can i get the items to be visible to all players. Please help me

GoRRageBoy 09-03-2011 16:05

Re: I can not figure out how to get the items visible
 
Quote:

Originally Posted by ddog123456 (Post 1547333)
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 (Post 1546971)
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 (Post 1546971)
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.

ddog123456 09-03-2011 16:49

Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
 
ok, so how do you give someone a weapon permanently even when they leave the server.

GoRRageBoy 09-03-2011 16:59

Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
 
Quote:

Originally Posted by ddog123456 (Post 1547399)
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.

FlaminSarge 09-03-2011 19:26

Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
 
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.

GoRRageBoy 09-04-2011 01:29

Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
 
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.

FlaminSarge 09-04-2011 08:06

Re: I can not figure out how to get the items visible
 
Quote:

Originally Posted by GoRRageBoy (Post 1547370)
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.

GoRRageBoy 09-04-2011 17:02

Re: I can not figure out how to get the items visible
 
Quote:

Originally Posted by FlaminSarge (Post 1547822)
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 :P

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

FlaminSarge 09-04-2011 17:45

Re: [TF2Items] Give Weapon (v3.04, 08/28/2011)
 
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.


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

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