RedM
  • πŸ‡«πŸ‡·Home
  • πŸ§‘β€πŸŒΎAmbient NPC
  • β›ΊCampement
  • πŸƒCard Collection
  • β™ŸοΈChess & Checkers Game
  • πŸ’£Dynamite
  • πŸ™‹Environment animations
  • πŸ”₯Fire sync
  • 🐎Feeding Horse + Syringe
  • 🚭Illicit Sales
  • βš–οΈInstances
  • πŸ“₯Market Stall
  • 🩺Medical Records
  • 🍲Metabolism
  • πŸ—£οΈMumble Block UI
  • ⏸️Pause Menu
  • ⌨️Quick Keys Menu
  • πŸ’΅Reward Loyalty and Total playtime
  • πŸ–‹οΈTattoo
  • πŸ₯‡Top Serveurs
  • ⚰️Undertaker
  • πŸ’€Wanted
  • πŸ”«Weapon Cleaning Animation
  • 🏹Weapon Rack
Powered by GitBook
On this page

Instances

Instances in RedM refer to separate, isolated environments within the game world. These environments are used to manage groups of players in a way that they do not interact with or see players from other instances. This concept is similar to β€œphasing” or β€œsharding” used in other online games.

Types of Instances

  1. Default Instance:

    • Typically identified by ID 0, this is the default instance used by the server. You can modify this default instance ID in the config.lua file if you use a different default instance.

  2. Script Instances:

    • These are instances created automatically by other scripts (e.g., during character creation or selection in VORP). They are displayed to indicate which players are in these instances.

  3. Admin Instances:

    • These instances are manually created by administrators. You can select a non-administrator player to assign them the role of instance administrator (such as the event organizer). They will be able to kick players, transfer players into their instance, disable NPCs inside this instance, choose another administrator or delete the instance.

Client Side

Open administrator menu - Instances Management :

Add your steam identifier inside :

Config.AdminIdentifiers = {}
TriggerServerEvent("Botiv-OpenAdminMenu") -- or /instances

Open player group menu - Group Management :

TriggerServerEvent("Botiv-OpenInstanceGroupMenu") -- or /group

Here is an excerpt from the config.lua file : (parts of the excerpt are hidden)

Config = {}
Config.DEBUG = false -- show current players instance every CheckInterval and Open Admin Menu if player is admin

---
Config.AllowInstancesForAll = false -- [WARNING] this allows all players to use this script as an administrator
-- Admin steam identifier for Config.CommandAdmin
Config.AdminIdentifiers = {
    "steam:11000010200f727",
    "steam:11000010144f888",
    "steam:110000145bt77e3"
}
---
---
Config.DefaultInstanceId = 0 -- instance id after script restart or stop
Config.CheckInterval = 5 -- check interval in seconds

-- Admin Command
Config.EnableCmd = true -- enable Config.CommandAdmin and Config.CommandGroup
Config.CommandAdmin = "instances" -- Command /instances for admins
Config.CommandGroup = "group" -- Command /group for players

Last updated 9 months ago

βš–οΈ