+Use for TF2, hooked to secondary fire?
I'm trying to get a few plugins together that will make playing garrys mod maps in tf2 smooth.
One of the features that garry's mod has that TF2 doesn't is an abundance of +use functions. (Doors, levers etc.) I know it's possible to hook into player actions to have it do alternate things. I'm wondering how to make a plugin that whenever you press your alt fire (right click) it also does +use. This bind is called "+attack2" Alternatively, it might work for this to be bound to whenever someone calls for medic. As in... look at a door, call medic... door opens. -Ched |
Re: +Use for TF2, hooked to secondary fire?
you might be able to (Fake)ClientCommand +use
|
Re: +Use for TF2, hooked to secondary fire?
Thanks chdata for the response. I tried using FakeClientCommandEx() to send the command but I got a "Unknown command: +use" error message.
This is my code: PHP Code:
|
Re: +Use for TF2, hooked to secondary fire?
PHP Code:
|
Re: +Use for TF2, hooked to secondary fire?
You might want to have you plugin verify that tf_allow_player_use is set to 1 so that the game server doesn't ignore +use.
|
Re: +Use for TF2, hooked to secondary fire?
Thanks guys for your help and support. The following is my working code for the simple plugin:
Turns out I needed a '+=' instead of the '&=' PHP Code:
|
Re: +Use for TF2, hooked to secondary fire?
Quote:
|
Re: +Use for TF2, hooked to secondary fire?
Or you can use:
PHP Code:
|
Re: +Use for TF2, hooked to secondary fire?
Quote:
|
Re: +Use for TF2, hooked to secondary fire?
Ok, so I just spent the night putting new things into this plugin. I've also changed it so it doesn't need a string.
I want it to be eventually released to the public. Very open to suggestions/advice. I've added 3 new features to this plugin. 1) It now modifies your speed and jump height to approximately match a Garry's mod character. ----> This requires TF2 Attributes 2) It uses the the [ANY] Resize Players plugin to re-size players to approximately match a Garry's mod character. 3) It now has a cvar to enable/disable. <-- this only works if it's set BEFORE the map loads... best way to do this is through map.cfg settings What do you guys think? PHP Code:
|
All times are GMT -4. The time now is 17:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.