Garry's Mod Wiki

Garry's Mod Wiki

  boolean GM:OnCloseCaptionEmit( string soundScript, number duration, boolean fromPlayer, string fullText )

Description

Called when a caption/subtitle has been emitted to the closed caption box.

Arguments

1 string soundScript
The name of the soundscript, or customLuaToken if it's from gui.AddCaption
2 number duration
How long the caption should stay for
3 boolean fromPlayer
Is this caption coming from the player?
4 string fullText
The caption. Can be nil if its token is not registered

Returns

1 boolean
Return true to prevent the caption from appearing

Example

hook.Add( "OnCloseCaptionEmit", "OnCloseCaptionEmit_Example", function( soundScript, duration, fromPlayer, fullText ) print( "Close caption emitted:", fullText, duration, fromPlayer, soundScript ) end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...