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

[TF2] Red-Tape Disabler


Post New Thread Reply   
 
Thread Tools Display Modes
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-10-2013 , 08:54   Re: [TF2] Red-Tape Disabler
Reply With Quote #21

Not really easy for understanding.
The whole vgui panel thing is a bit odd, and may put off some players forcing them off their teams. Also, you pass client in a timer, you should use userids or client serials.
And yeah, this method will not work for wearable weapons, as getweapnslot will return -1, instead you will have to findentity by classname. Again, this is why we have things like tf2items and now, tf2attributes.. So we can edit and replace items seamlessly.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 09-10-2013 at 08:55.
friagram is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 09-10-2013 , 09:00   Re: [TF2] Red-Tape Disabler
Reply With Quote #22

Quote:
Originally Posted by friagram View Post
Not really easy for understanding.
The whole vgui panel thing is a bit odd, and may put off some players forcing them off their teams. Also, you pass client in a timer, you should use userids or client serials.
And yeah, this method will not work for wearable weapons, as getweapnslot will return -1, instead you will have to findentity by classname. Again, this is why we have things like tf2items and now, tf2attributes.. So we can edit and replace items seamlessly.
Yeah but I only need to disable the razorback... running another extension and plugin just so I can disable one weapon seems inefficient...
__________________
luki1412 is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-10-2013 , 09:44   Re: [TF2] Red-Tape Disabler
Reply With Quote #23

Then just hook inventory application and findentitybyclassname tf_wearable and kill it if it belongs to the client, matches that item def. you do not really need to worry about it being a disguise wearable since you will be removing them all, but you can check agains that too.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-10-2013 , 09:50   Re: [TF2] Red-Tape Disabler
Reply With Quote #24

Quote:
Originally Posted by luki1412 View Post
I tried both plugins with index 57 for razorback and it does nothing for me, no errors just doesnt work
tf_wearable items don't show up to SourceMod as weapons. That includes things that would normally take up a weapon slot but aren't selectable such as Sniper shields, Demoman Shields, Demo shoes, and Soldier boots.

As far as I know, TF2Items is the only way to block the items from being given.

Just outright killing an item (such as friagrams just mentioned) sometimes doesn't remove its attributes. I'm not sure exactly why that is, and it may only apply to set attributes (removed from the game two months ago).

TF2Attributes is the only way of removing the item's attributes without blocking the item.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 09-10-2013 at 09:52.
Powerlord is offline
spumer
Senior Member
Join Date: Aug 2011
Old 09-10-2013 , 23:01   Re: [TF2] Red-Tape Disabler
Reply With Quote #25

luki1412, As frigram said — we can find all tf_wearable items for given player and check def. index.
If you need this, i can try improve my plugin.

Do you need it, luki1412?
__________________
spumer is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 09-11-2013 , 09:47   Re: [TF2] Red-Tape Disabler
Reply With Quote #26

Quote:
Originally Posted by spumer View Post
luki1412, As frigram said — we can find all tf_wearable items for given player and check def. index.
If you need this, i can try improve my plugin.

Do you need it, luki1412?
I do need this for The Hidden mod(tf2) server. I might use it for more weapons later on so Id like to see something like that working. You should also try to remove the weapons and give them stock ones so they have to use stock them or change their loadout. Would be very helpful plugin. You might also just create a new plugin thread for that weapon disabler. Author of the hidden mod actually uses no extensions to remove and give weapons and its always working. Thats what I was trying to do. You guys told me that its better to use extension instead so I just dont know...

Part of the Hidden mod code...
PHP Code:
...
    
TF2_RemoveWeaponSlot(i0); // Revolver
    //TF2_RemoveWeaponSlot(i, 1); // Sapper
    
TF2_RemoveWeaponSlot(i2); // Knife
    
TF2_RemoveWeaponSlot(i3); // Disguise Kit
    
TF2_RemoveWeaponSlot(i4); // Invisibility Watch
    
TF2_RemoveWeaponSlot(i5); // Golden Machine Gun
                                        
    // This will add the knife to the spy, even if he has another unlock
    
new knife=GivePlayerItem(i"tf_weapon_knife");
    
SetEntProp(knifeProp_Send"m_iItemDefinitionIndex"4);
    
SetEntProp(knifeProp_Send"m_iEntityLevel"100);
    
SetEntProp(knifeProp_Send"m_iEntityQuality"10);
    
SetEntProp(knifeProp_Send"m_bInitialized"1);

    
// Also, I hate extensions :p
    
EquipPlayerWeapon(iknife);
... 
__________________
luki1412 is offline
Chride2k8
New Member
Join Date: Sep 2013
Old 09-11-2013 , 13:33   Re: [TF2] Red-Tape Disabler
Reply With Quote #27

I don't know if it's just me or what...but I didn't get this do work at all. I tried the basic wep disabler but no luck.
I would need to disable all mediguns, shields and caber from our servers. Any help? -if anyone has any suggestions then I suppose the fastest contact way is over steam.
Chride2k8 is offline
spumer
Senior Member
Join Date: Aug 2011
Old 09-30-2013 , 11:16   Re: [TF2] Red-Tape Disabler
Reply With Quote #28

So, i create modification and sent it long time ago to Chride2k8, but has no response.
I can't test this version, and if you can — please, let me know if it works or not.
I will try to fix and add to first post or create separate thread.
Attached Files
File Type: sp Get Plugin or Get Source (basic_weapon_disabler_1.2.sp - 208 views - 3.3 KB)
File Type: cfg bwd.cfg (778 Bytes, 80 views)
__________________
spumer is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 10-01-2013 , 15:11   Re: [TF2] Red-Tape Disabler
Reply With Quote #29

Quote:
Originally Posted by spumer View Post
So, i create modification and sent it long time ago to Chride2k8, but has no response.
I can't test this version, and if you can — please, let me know if it works or not.
I will try to fix and add to first post or create separate thread.
Was not working for the razorback :/
__________________
luki1412 is offline
Js41637
Member
Join Date: May 2013
Location: Australia, NSW
Old 11-08-2013 , 06:05   Re: [TF2] Red-Tape Disabler
Reply With Quote #30

Some people are reporting that they don't see the message come up saying that their weapon is blocked?

Any idea why?
Js41637 is offline
Send a message via Skype™ to Js41637
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 04:43.


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