G.BroadcastLua

From GMod Wiki

Jump to: navigation, search
Function
Syntax BroadcastLua( String code )
Where is this used?
Description:
Executes the given code on all clients.
Returns: nil
Part of Library: Global Functions
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.BroadcastLua]G.BroadcastLua [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionFrom MelonRacer - the crude method of creating a countdown.
Used onNewerServer.png
Code
timer.Simple( 2, function() BroadcastLua( "FireCountdown( 'melonracer/3' )" ) end )
timer.Simple( 3, function() BroadcastLua( "FireCountdown( 'melonracer/2' )" ) end )
timer.Simple( 4, function() BroadcastLua( "FireCountdown( 'melonracer/1' )" ) end )
OutputA countdown is executed on all clients.


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox