Package Protocol

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

When referencing to other files in client_packages, you use package:// The root of this protocol is the client_packages folder.

For example, a file located in client_packages\index.html can be referred to with package://index.html A file located in client_packages\my-resource\index.html can be referred to with package://my-resource/index.html You can also require json files with it package://my-resource/beasts.json, so it'll be const beasts = require('package://my-resource/beasts.json')

  • NOTE: JSON Require only works in CEF.