Package Protocol

From RAGE Multiplayer Wiki
Revision as of 16:53, 8 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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`.