Voltaism Dev Tips

From Onset Developer Wiki
Revision as of 18:27, 6 July 2021 by Voltaism (talk | contribs) (added first server tip)

WIP

Serverside Tips

Restart self using an exported function

Package 1:

function RestartPackage(package_name)
    Delay(1, function()
        StopPackage(package_name)
    end)
    Delay(1000, function()
	    StartPackage(package_name)
    end)
    return true
end
AddFunctionExport("RestartPackage", RestartPackage)

Package 2:

local package1 = ImportPackage("package1")
package1.RestartPackage(GetPackageName())

Clientside Tips