JGS Docs
  • 👋Welcome!
  • 📚Resources Docs
    • 💭JGS Dynamic Chat
      • ⚠️Dependencies
      • 🔧Installation
      • 🗃️Exports
      • ⚙️Configuration
        • Configs
        • Discord Logs
        • Templates
        • Suggestions
        • Clipboard
        • Config JS
    • 💬JGS Samp Chat
      • ⚠️Dependencies
      • 🔧Installation
      • ⚙️Configuration
    • 🍔JGS Modern HUD
      • ⚠️Dependencies
      • 🔧Installation
      • 🗃️Exports & Commands
      • ⚙️Configuration
Powered by GitBook
On this page
  • 1. Latest Artifacts Modifications
  • 2. Resource Installation
  • 3. Emergency Alert Installation
  • 4. Origen Police Modifications

Was this helpful?

  1. Resources Docs
  2. JGS Dynamic Chat

Installation

Here we're going to guide you in the installation of jgs-chat.

PreviousDependenciesNextExports

Last updated 9 days ago

Was this helpful?

First of all we want you to know that our script only supports the versions of the two most used frameworks, in previous versions it can be usable but we do not provide support since the development is focused on the updated versions of the ESX and QBCore frameworks.

1. Latest Artifacts Modifications

From artifacts version 12083, must follow this.

The default "chat" resource is now located within the artifacts folder under the following path: citizen/system_resources/chat.

Ensure you delete the default "chat" resource from the "system_resources" folder before proceeding with a standard installation of our custom chat system. This step is crucial to avoid conflicts and to ensure the smooth functionality of your server.

In addition, you must disable the configuration of your server.cfg that appears as follows:

set resources_useSystemChat false

2. Resource Installation

The installation of the script is very simple. First of all, you will make sure you have the dependencies installed on your server.

Secondly, you are going to download the file and then unzip it. Next, you are going to drag the file to your server. When you have completed the process, you are going to go to the server.cfg file and make the following changes:

server.cfg
ensure oxmysql
ensure ox_lib
ensure es_extended

ensure jgs-chat
server.cfg
ensure oxmysql
ensure ox_lib
ensure qb-core

ensure jgs-chat

3. Emergency Alert Installation

Below you will find a guide to install Emergency Alert on your server.

What is the Emergency Alert? It is an alert that should be executed automatically after sending a distress command to the different factions of the server. It is most commonly installed when calling the police (/environment, /911).

You should go to the client section of your script where the command or event of the alert section is registered. For example, if you have a dispatch with a cl-side section that registers the command /911 you should go to that code.

Once located in that line of code you will add the following code:

client.lua
RegisterCommand('911', function()
    (... your command code)
    ExecuteCommand('sendEmergencyAlert-proximity')
end, false)

After adding this line of code with the ExecuteCommand you will be able to enjoy the alert at the moment of sending the same command.

You will have to go to custom/clients/commands.lua in row 47 and modify the following code

custom/client/commands
RegisterNetEvent("origen_police:client:onPlayerCall911", function(message)
    -- This is for the 911 call
    ExecuteCommand('sendEmergencyAlert-proximity')
end)

RegisterNetEvent("origen_police:client:onPlayerCall911ems", function(message)
    -- This is for the 911ems call
    ExecuteCommand('sendEmergencyAlert-proximity')
end)

After adding this line of code with the ExecuteCommand you will be able to enjoy the alert at the moment of sending the same command.

4. Origen Police Modifications

Tendrás que modificar la función UseCommand para poder utilizar correctamente los comandos de Radio en combinación con la compatibilidad OrigenPolice. Reemplaza la siguiente función:

custom/client/commands
function UseCommand(type, message)
    if type == 'me' then 
        ExecuteCommand("me "..message)
    elseif type == 'do' then
        ExecuteCommand("do "..message)
    elseif type == 'rpol' then
        ExecuteCommand("r "..message)
    end
end

📚
💭
🔧
⚠️Dependencies
CFX Portal