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

Weapon Rack

Script developed for the server REVEALED | FR | Free Access | Serious RP

You need to read the README file.


You can create your weapon rack with one of these four methods :

1 . Use the item "weaponrack" or another item defined in the Config.WeaponRack

2. Client-side executed event.

TriggerEvent("bt_rack:startPlaceObject")
  1. Server-side executed event.

TriggerClientEvent("bt_rack:startPlaceObject", source)
  1. You can, for example, link an inventory item:

Server Side

local VORPInv = exports.vorp_inventory:vorp_inventoryApi()
VORPInv.RegisterUsableItem("weaponrack", function(data)
    TriggerClientEvent("bt_rack:startPlaceObject", data.source)
    VORPInv.CloseInv(data.source)
end)

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

Config = {}
Config.DEBUG = false -- Open stall creator UI
--- TO CREATE A STALL (3 solutions)
-- 1 : Server To Client -> TriggerClientEvent("bt_rack:startPlaceObject", source)
-- 2 : or Client To Client -> TriggerEvent("bt_rack:startPlaceObject")
-- 3 (default) : or Vorp Inventory item use ->
Config.WeaponRack  = "weaponrack" -- Item to use for vorp inventory (leave empty to disable)
---
Config.OpenMarket       = keys["U"] -- it's not an error, same key
Config.CraftObject      = keys["U"] -- it's not an error, same key
Config.ChangeDistance   = keys["DOWN"]
Config.RotateLeft       = keys["LEFT"]
Config.RotateRight      = keys["RIGHT"]
Config.Cancel           = keys["R"]
-- RESTRICTIONS & ADMIN
-- Leave empty for no restricted job or items
Config.WhitelistJobs = {}         -- Only allow these jobs to place and manage rack (leave empty = everyone allowed)
Config.BlacklistJobs = {}         -- Disallow these jobs from placing and manage rack
Config.WeaponList = { -- Weapon Whitelist (labels are defined by your game language; they are the official RDR2 names assigned to each weapon hash)
 -- hidden
}
Config.AdminRole = { -- Staff role who can delete a Stall
 "mod",
 "admin",
 "superadmin"
}

Config.OnlyStaffCanDeleteStalls = false -- true = only staff can delete rack / false = owners and staff can delete rack
Config.SpamSeconds = 1 -- time to wait in seconds btw actions

-- DISCORD STAFF WEBHOOK
Config.DiscordWebhook   = "" -- Discord canal webhook (ex : https://discord.com/api/webhooks/1212121212/StmZ_AazZZykg69RY1gRZnp7h4121212AZAbAbBlWxyJzaMq)
Config.DiscordName      = "BT_WEAPONRACK" -- The title of the Discord message.
-- TRANSLATE

Config.NUILangage = "en" -- fr, en, es, pt, de, it (If your langage is not listed, add it in `nui/js/translate.js`)
Config.Txt = {
     -- hidden
}

-- UI NOTIFICATION
function SendNotification(source, type, message) -- Server Side
    TriggerClientEvent("bt_rack:showNotification", source, type, message) -- BT_STALL
end

Last updated 1 month ago

🏹