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

Bind a Key for a Player?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
badwolf
Senior Member
Join Date: Apr 2010
Old 10-18-2010 , 12:50   Bind a Key for a Player?
Reply With Quote #1

Is there any way to bind a key to something for a player that may not be able to access the console, not know how to bind keys or access the console, etc?

I was thinking of something along the lines of them typing a trigger '!bind', and then gaining a bound key without needing to open the console.
badwolf is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-18-2010 , 12:54   Re: Bind a Key for a Player?
Reply With Quote #2

Aye, this was disabled back in ~2007-2008 if memory serves me correctly >.<. The most you can do is have !bind open instructions on how to bind keys.
__________________
thetwistedpanda is offline
Death [GER]
Senior Member
Join Date: Mar 2010
Old 10-20-2010 , 03:16   Re: Bind a Key for a Player?
Reply With Quote #3

Well in some HL2 Mods you still can bind players keys (You can do all client exec things..) but yeah it was disabled years ago in the main games
__________________
Death [GER] is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 10-20-2010 , 05:17   Re: Bind a Key for a Player?
Reply With Quote #4

Question: is "bind" a ConVar ? [ ] yes [x] no.
As thetwistedpanda said, just give the client an instruction how to do it himself.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 10-20-2010 , 05:29   Re: Bind a Key for a Player?
Reply With Quote #5

Then this?

ClientCommand(client, "bind t \"say test\"");
__________________
Silvers is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-20-2010 , 11:26   Re: Bind a Key for a Player?
Reply With Quote #6

Silvers, this was intentionally patched by Valve to prevent abusive admins and slow hacking, there isn't away around it as far as we know.
__________________
thetwistedpanda is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 10-20-2010 , 12:19   Re: Bind a Key for a Player?
Reply With Quote #7

PHP Code:
#include <sourcemod>

public OnPluginStart()
{
    
RegAdminCmd("sm_bind"CmdBindsADMFLAG_GENERIC);
    return 
Plugin_Handled;
}

public 
Action:CmdBinds(clientargs)
{
    
ClientCommand(client"bind t \"say test\"");

Works for me when I type !bind in Left4Dead2, maybe it's disabled in certain games?
__________________
Silvers is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-20-2010 , 12:24   Re: Bind a Key for a Player?
Reply With Quote #8

L4D 1/2 run on a modified engine, so it works there, as well as in certain HL2 mods that never got the treatment. Otherwise most Source/OB games are unable to perform it.
__________________
thetwistedpanda is offline
Marcus101RR
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 10-21-2010 , 12:57   Re: Bind a Key for a Player?
Reply With Quote #9

Quote:
Originally Posted by thetwistedpanda View Post
L4D 1/2 run on a modified engine, so it works there, as well as in certain HL2 mods that never got the treatment. Otherwise most Source/OB games are unable to perform it.
hasnt failed me on any game yet. Slow hacking? You mean griefers ruining our games...right? That is why i change their controls and cfg files so they learn to fuck off.
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-21-2010 , 14:54   Re: Bind a Key for a Player?
Reply With Quote #10

Quote:
Originally Posted by Marcus101RR View Post
That is why i change their controls and cfg files
And format their hard drives?
__________________
FaTony 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 07:40.


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