DoesPakExist: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|Checks if a pak with the specified name exists.}} {{FuncSyntax|DoesPakExist(PakName)}} {{FuncParameters}} {{FuncParam|PakName...")
 
No edit summary
Line 11: Line 11:


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
local pakname = "TestMod"
print("Pak exists: ".. DoesPakExist(pakname) and "True" or "False" .. ".")
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:PakFunctions}}

Revision as of 07:09, 30 December 2019

DoesPakExist

Type: Function
Context: Client
Introduced: v1.0

Description

Checks if a pak with the specified name exists.

Syntax

DoesPakExist(PakName)

Parameters

  • PakName
    The name of the Pak file without extension.

Return Value

  • Returns true when the Pak exsits.

Example

local pakname = "TestMod"
print("Pak exists: ".. DoesPakExist(pakname) and "True" or "False" .. ".")

See also

Template:PakFunctions