IsKeyBound

From Multi Theft Auto: Wiki
Revision as of 18:10, 10 October 2006 by MrJax (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function can be used to find out if a key has already been bound.

Syntax

bool isKeyBound ( player thePlayer, string key, [ string keyState, string function ] ) 

Required Arguments

  • thePlayer: The player you're checking.
  • key: The key you're checking. See Key names for a list of valid key names.

Optional Arguments

  • keyState: Is the state of the key when it calls the function, Can be either:
    • "up": when the key is released
    • "down": when the key is pressed
  • function: The function you're checking against

Note: If you do not specify a keyState or function, any instances of key being bound will be count.

Example


See Also