DontAutoStartScript
This function was added in DSL 1
Description
Stop execution of your script and shut it down if it was started automatically.
This is a header function, meaning it is meant to go on the top of your main script as an alternative to using config.txt.
Calling this function will instantly stop execution of your script and shut it down if it was started automatically. If a main script of a collection is shutdown as a result of calling this function, the entire collection will also be shutdown.
warning
It is worth noting that a script being loaded as a dependency to an automatically started script or collection will not be stopped by this function.
function DontAutoStartScript() --[[ ... ]] end
Parameters
None.
Return Values
None.
Example
Give the player money, but only if the script was started manually.
DontAutoStartScript()
PlayerAddMoney(10000)