Skip to content

Conversation

@Xenius97
Copy link
Contributor

@Xenius97 Xenius97 commented Nov 14, 2025

This PR enables the usage of the getResources() function on the client side as well.
Currently, the only way to list resources on the client is through workarounds for example, manually writing every resource name into a Lua table and iterating over them using getResourceFromName.
This change provides a simpler and more transparent method, primarily useful for debugging purposes.

addCommandHandler("c_listresources", function()
    for i, res in ipairs(getResources()) do
        outputChatBox(i .. ": " .. getResourceName(res))
    end
end)

Important

This only lists resources that are running on the client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant