diff --git a/newmodels_reborn/core/shared_exported.lua b/newmodels_reborn/core/shared_exported.lua index 874fa08..626e63a 100644 --- a/newmodels_reborn/core/shared_exported.lua +++ b/newmodels_reborn/core/shared_exported.lua @@ -1,5 +1,8 @@ -- !! THIS SCRIPT IS ENTIRELY EXPORTED !! --- Variable IS_IMPORTED will be true if this script is imported by another resource + +-- Variable IS_IMPORTED will be replaced to true +-- when this script is imported by another resource using the import() function +IS_IMPORTED = false local isClientsideScript = localPlayer ~= nil diff --git a/newmodels_reborn/core/shared_importfunc.lua b/newmodels_reborn/core/shared_importfunc.lua index f5fd793..8a02604 100644 --- a/newmodels_reborn/core/shared_importfunc.lua +++ b/newmodels_reborn/core/shared_importfunc.lua @@ -15,7 +15,7 @@ function import() if not exportScriptString or exportScriptString == "" then return error("Failed to read file.") end - exportScriptString = "IS_IMPORTED = true\n\n" .. exportScriptString + exportScriptString = exportScriptString:gsub("IS_IMPORTED = false", "IS_IMPORTED = true") end return exportScriptString end