Here we're going to guide you in the installation of jgs-chat.
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:
setresources_useSystemChatfalse
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 CFX Portal 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:
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:
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
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:
RegisterCommand('911', function()
(... your command code)
ExecuteCommand('sendEmergencyAlert-proximity')
end, false)
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)
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