M MY Multiplayer: Wiki
Side
Kind

refreshResources

Shared

Reads the resources folder again: adds the new resources, removes the ones that are gone (stopping those that ran) and logs which running resources changed on disk.

int refreshResources()

Returns

How many resources are known after the scan. On the client, which has no resources folder, 0.

A resource that changed on disk keeps running the old version until it is restarted.

Example

addCommandHandler("refresh", function()
    local count = refreshResources()
    outputServerLog(count .. " resources known")
end)

See also