Package Protocol

From RAGE Multiplayer Wiki

JavaScript Syntax


Summary

http://package/ is the protocol for the root folder of `client_packages`, allowing easy access to files client-side.

When referencing files in `client_packages`, use
http://package/
. Examples:
  • A file in `client_packages\index.html` can be accessed as
    http://package/index.html
    .
  • A JSON file in `client_packages\my-resource\beasts.json` can be required as
    const beasts = require('http://package/my-resource/beasts.json');
    .

Package2

http://package2/
functions similarly, caching resources for faster access. Works if CEF files are in `client_packages/package2`.