Player/SendLua

From Garry's Mod
Jump to: navigation, search
 Player:SendLua( )

Contents

Description

Executes a simple Lua string on the player.

Note: The string is limited to 254 bytes. Consider using the net library for more advanced server-client interaction.

Arguments

string script

The script to execute.

Examples

Example

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

local pl = Entity( 1 )
pl:SendLua( "print( 'Hello World' )" )


Personal tools
Navigation