OnClientConsole: Difference between revisions
Jump to navigation
Jump to search
m (ouputChatBox had a player arg (only required server-side).) |
mNo edit summary |
||
Line 2: | Line 2: | ||
{{Client event}} | {{Client event}} | ||
__NOTOC__ | __NOTOC__ | ||
This event is triggered when the local player enters text in the console. Note that, if you want to add custom console commands, it is easier to the [[addCommandHandler]] function. | This event is triggered when the local player enters text in the console. Note that, if you want to add custom console commands, it is easier to use the [[addCommandHandler]] function. | ||
==Parameters== | ==Parameters== |
Revision as of 10:55, 2 August 2011
This event is triggered when the local player enters text in the console. Note that, if you want to add custom console commands, it is easier to use the addCommandHandler function.
Parameters
string text
- text: the text line that was entered.
Example
This example outputs any text you input into the console.
function consoleCheck(text) outputChatBox("You entered into the console: "..text,255,255,0) end addEventHandler("onClientConsole",getLocalPlayer(),consoleCheck)
See Also
Other client events
- onClientChatMessage
- onClientConsole
- onClientDebugMessage
- onClientExplosion
- onClientFileDownloadComplete
- onClientHUDRender
- onClientMinimize
- onClientMTAFocusChange
- onClientPedsProcessed
- onClientPlayerNetworkStatus
- onClientPreRender
- onClientRender
- onClientRestore
- onClientTransferBoxProgressChange
- onClientTransferBoxVisibilityChange
- onClientWorldSound
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled