AddSharedScript

From Onset Developer Wiki
Revision as of 12:03, 11 January 2021 by BlueMountains (talk | contribs) (Created page with "{{Info|Function|Server|1.4.1}} {{FuncDescription|Registers a shared script (runs on the server and client) to this package. This function only works in the packages#index....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
AddSharedScript

Type: Function
Context: Server
Introduced: v1.4.1

Description

Registers a shared script (runs on the server and client) to this package.

This function only works in the index.lua script.

Syntax

AddSharedScript(file)

Parameters

  • file
    The shared script to register. Wildcards (*) are supported.

Return Value

  • Returns true on success.

Example

--index.lua
AddSharedScript("shared/*.lua")

See also