OnClientCharacter
From Multi Theft Auto: Wiki
This event triggers whenever the user presses an alphanumeric character on their keyboard. This also includes special characters, ie. " / # % [ ] { }.
Parameters
string character
- character: This represents the pressed character
Source
The source of this event is the client's root element.
Example
This example will output the pressed character in the chatbox.
function outputPressedCharacter(character) if character==" " then --if the character is a space character = "space" --change 'character' to 'space' end outputChatBox("You pressed the character "..character.."!") --output the character end addEventHandler("onClientCharacter", getRootElement(), outputPressedCharacter)
See Also
GUI events
- onClientGUIClick
- onClientGUIDoubleClick
- onClientGUIChanged
- onClientGUIAccepted
- onClientGUIScroll
- onClientClick
- onClientDoubleClick
- onClientKey
- onClientCharacter
- onClientMouseEnter
- onClientMouseLeave
- onClientMouseMove
- onClientMouseWheel
- onClientCursorMove
- onClientGUIMouseDown
- onClientGUIMouseUp
- onClientGUIMove
- onClientGUISize
- onClientGUITabSwitched
Client event functions
FROM VERSION 1.4 r4973 ONWARDS