This documentation is for developers who are making scripts for redm, you should also note that this is a work in progress and anything can be changed at any time until the final release.
You cannot Import encrypted files like with escrow etc, only files that aren’t encrypted can be imported.

Lib usage

To import modules to your script you must add the following to the script fxmanifest.lua file
fxmanifest
   shared_script "@vorp_lib/import.lua"
the global variables below will be available for both server and client, so make sure you dont call vorp exports in your script to avoid calling it twice.
  • LIB is a global variable that contains a table with CORE and NOTIFY as sub-variables like LIB.CORE and LIB.NOTIFY to access them easily

Module Import

Only Lua files can be imported

List of Modules

Importing Modules

Import Usage

Modules

The following modules are available in the lib, you can import them using the Import function, documentation for each module will be available below

Entities

This module is used to create entities like peds, vehicles, objects, etc, it has a baseclass for all entities and sub classes for each entity type all creations are instanced objects every creation will have its own instance and wont be shared with other scripts since its imported to your script when you restart your resource the entities will be removed for easy development it has a entity tracker if you wish to track the entities from other scripts (see collector file) for exports

Map

The map module is used to create blips for now but will be expanded to include more map related features when you restart your resource the blips will be removed for easy development

Inputs

this module is used to create input controls for your resource, single or multiple , without the user having to create loops and a bunch of code all creations are instanced objects every creation will have its own instance and wont be shared with other scripts since its imported to your script when you restart your resource the inputs will be removed for easy development

Prompts

this module is used to create prompts with coordinate-based activation, multiple prompts can be grouped together and managed as one unit all creations are instanced objects every creation will have its own instance and wont be shared with other scripts since its imported to your script when you restart your resource the prompts will be removed for easy development

Commands

this module is used to register client-side/server-side commands with permissions, suggestions, and argument validation all creations are instanced objects every creation will have its own instance and wont be shared with other scripts since its imported to your script when you restart your resource the commands will be removed for easy development, if a command is active and suggestion hasnt been marked to add on register, it will be added on character selected automatically

Points

this module is used to create coordinate-based enter/exit areas with radius detection, multiple points can be registered and managed independently all creations are instanced objects every creation will have its own instance and wont be shared with other scripts since its imported to your script when you restart your resource the points will be removed for easy development

Events

this module is used to register game event listeners that can capture and process native game events with automatic data parsing all creations are instanced objects every creation will have its own instance and wont be shared with other scripts since its imported to your script when you restart your resource the event listeners will be removed for easy development

DataView

this module provides JavaScript-like DataView functionality for handling binary data in Lua with support for various data types and endianness this module is based on gottfriedleibniz’s DataView implementation providing efficient binary data manipulation

Streaming

this module provides utility functions for loading various game assets like models, animations, textures, and more with automatic cleanup and timeout handling all functions handle the loading process with proper validation and error handling, preventing common issues with asset streaming

Class

this module provides a complete object-oriented programming system for Lua with classes, inheritance, private members, and automatic getters/setters supports both traditional Lua OOP patterns and modern structured approaches with automatic property management was inspired by JavaScript classes

Functions

utility classes for control flow, timing, and conditional execution provides Switch-case patterns, repeating intervals, and one-time timeouts with full control over execution state shared between server and client environments

Notify

notification module for displaying various types of notifications to players from the base game supports both server and client environments with different method signatures