SuleymanM Posted May 28, 2013 Share Posted May 28, 2013 Hi all, All know "SUport SYstem" -> viewtopic.php?f=108&t=41565 How to create an bindKey to this resource (not /bind...) i want when press F2 to appear the system. ------- bindKey ("F2"...??? or other function? Link to comment
xXMADEXx Posted May 28, 2013 Share Posted May 28, 2013 Not sure, but you can try this: addEventHandler ( "onPlayerJoin", root, -- It binds when you connect. function () bindKey ( source, "H","down",supportCommand ) end ) Link to comment
Schlammy Posted May 28, 2013 Share Posted May 28, 2013 bindKey ( source, "H","down","command") ??? Link to comment
Moderators IIYAMA Posted May 28, 2013 Moderators Share Posted May 28, 2013 yes, Read Client/server syntax 2 carefully. (wiki mta) Client - Syntax 2 This alternative syntax allows you to bind a key with a command. This will also allow users to customize the control in their Settings menu. Use in conjunction with addCommandHandler to add handler functions to the keybind. bindKey ( string key, string keyState, string commandName, [ string arguments ] ) Required Arguments key: The key or control you wish to bind to the command. See key names for a list of possible keys. keyState: A string that has one of the following values: "up": If the bound key should trigger the function when the key is released "down": If the bound key should trigger the function when the key is pressed "both": If the bound key should trigger the function when the key is pressed or released commandName: The name of the command that the key should be binded to. arguments Space delimited arguments that are entered as if one was typing the command. server Server - Syntax 2This alternative syntax allows you to bind a key with a command. This will also allow users to customize the control in their Settings menu. Use in conjunction with addCommandHandler to add handler functions to the keybind. bindKey ( player thePlayer, string key, string keyState, string commandName, [ string arguments ] ) Required Arguments thePlayer: The player you wish to bind the key of. key: The key or control you wish to bind to the command. See key names for a list of possible keys. keyState: A string that has one of the following values: "up": If the bound key should trigger the function when the key is released "down": If the bound key should trigger the function when the key is pressed "both": If the bound key should trigger the function when the key is pressed or released commandName: The name of the command that the key should be binded to. Optional Arguments arguments Space delimited arguments that are entered as if one was typing the command. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now