Garry's Mod Wiki

Player:SendLua

Player:SendLua( string script )

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

1 string script
The script to execute.

Example

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

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

Page Links


Special Pages


Wikis

?

Render Time: 27ms

Session 0
DB GetPage 3
Generate Html 3
SaveChanges 8
Render Body 0
Render Sidebar 11