AddCSLuaFile

From Garry's Mod
Revision as of 19:02, 22 March 2015 by Robotboy655 (Talk | contribs)
Jump to: navigation, search
 AddCSLuaFile( )

Contents

Description

Marks a Lua file to be sent to clients when they join the server.

Note: The file path is relative to the script it is ran from. For example, if your script is in lua/myfolder/stuff.lua, doing AddCSLuaFile("otherstuff.lua") and AddCSLuaFile("myfolder/otherstuff.lua") is the same thing.

Arguments

string file=nil

The name/path (relative to the garrysmod/lua folder) to the Lua file that should be sent. If no parameter is specified, it sends the current file.

Examples

Example

Adds the cl_init.lua file in the "lua" folder to be downloaded by connecting clients.

AddCSLuaFile( "cl_init.lua" )


Examples

Example

Adds the current file to the list of files to be downloaded by clients.

AddCSLuaFile()


Personal tools
Navigation