StopPackage

From Onset Developer Wiki
Revision as of 22:15, 17 May 2021 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
StopPackage

Type: Function
Context: Server
Introduced: v1.0

Description

Stops a package during runtime. If a client downloads files from it, the download will be cancelled.

Syntax

StopPackage(PackageName, Message)

Parameters

  • PackageName
    The name of the package.
  • Message (optional)
    Reason to print in the log for the unload.

Return Value

  • Returns true on success.

Example

function cmd_restartpack(player, package_)
	StopPackage(package_)

	Delay(500, function()
		StartPackage(package_)
	end)
end
AddCommand("restartpack", cmd_restartpack)

See also