Garry's Mod Wiki

Garry's Mod Wiki

  Player:SendLua( string script )

Description

Executes a simple Lua string on the player.

If you need to use this function more than once consider using net library. Send net message and make the entire code you want to execute in net.Receive on client.
The string is limited to 254 bytes. Consider using the net library for more advanced server-client interaction.

Arguments

1 string script
The script to execute.

Example

Sends "Hello World" to the client's console.

Entity( 1 ):SendLua( "print( 'Hello World' )" )

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...