OnClientCharacter

From Multi Theft Auto: Wiki
Revision as of 14:42, 30 April 2012 by NeXTreme (talk | contribs) (Created page with "{{Client event}} __NOTOC__ This event triggers whenever the user presses an alphanumeric character on their keyboard. This also includes special characters, ie. '''" / # % [ ] {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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)
    outputChatBox("You pressed the character "..character.."!")
end
addEventHandler("onClientCharacter", getRootElement(), outputPressedCharacter)

See Also

GUI events

Input

GUI


Client event functions