# Jota Dev Chat

<figure><img src="/files/U4LL6LoQCu2k8JM34PeD" alt=""><figcaption></figcaption></figure>

**Put in your server.cfg**

```markdown
# JotaDev Chat System
ensure jc_chat
```

**Configure the script to your liking**

{% tabs %}
{% tab title="Setting" %}
{% code expandable="true" %}

```lua
Config = {}

Config.Debug = false

Config.Framework = 'auto' -- 'auto' (automatic detection) | 'qb' or 'esx'

--[[  
Configure your language using the following:
  'es' -> Spanish
  'en' -> English
  'fr' -> French
  'de' -> German
  'it' -> Italian
  'pt' -> Portuguese
]]
Config.Locale = 'en' 

Config.AdminCommand = 'a' -- Admin command configuration

Config.Groups = { -- Groups according to your framework
  esx = { 'superadmin', 'admin', 'owner' },
  qb  = { 'god', 'admin' }
}

Config.MessageLimit = { -- Maximum messages you can put in the message input
  enabled = true,
  maxLength = 100
}

Config.AntiSpam = { -- Anti-spam configuration
  webhook = 'WEBHOOK_HERE',
  enabled = true,
  logToConsole = true,
  exemptAdmins = false
}

Config.TypingIndicator = { -- Typing indicator configuration / This function consume, 
  enabled = false,
  showDistance = 2.0
}

Config.Profanity = { -- Profanity filter configuration
  webhook = 'WEBHOOK_HERE',
  enabled = true,
  blockedWords = {
    'puta','mierda','pendejo','cabrón','gilipollas','imbecil','idiota',
    'negro','marica','perra','concha','hdp','maricon','puto','zorra',
    'cagon','culero','pelotudo','pendeja','tarado','estupido','mongolo',
    'hijo de puta','hijoputa','hijo de perra','hijo de la gran puta',
    'concha de tu madre','conchetumadre','pajero','boludo','forro','chupapija',
    'malparido','carapolla','polla','coño','puta madre','putamadre',
    'hijueputa','hijo e puta','la concha de tu madre','conchetumare',
    'culiao','culiado','qliao','qlo','weon','huevon','mamon','pinga','pene','pito','nabo',
    'choto','carechimba','caremonda','malnacido','desgraciado','cabronazo',
    'putita','putazo','puton','zorrita','gil','baboso','estupida','patan',
    'ptm','lpm','ctm','vrg',

    'fuck','fucking','motherfucker','mf','wtf','shit','bitch','cunt','dick',
    'pussy','asshole','bastard','jerk','retard','retarded','whore','slut',
    'son of a bitch','sonofabitch','s.o.b.','sob','idiot','moron','dumbass',
    'jackass','dickhead','imbecile','stupid', 'faggot','fag','homo','nigger','nigga',
    'cocksucker','prick','cock','penis','twat','wanker','jerkoff','jerk-off',
    'shithead','dickface','fuckface','scumbag'
  },
  exemptAdmins = false
}

Config.DefaultPositions = { -- Default chat positions
  input = { x = 0.8, y = 28 },
  messages = { x = 0.8, y = 1.5 }
}

Config.FadeTimeout = 8000

Config.MeDo3DNUI = false -- Enable/disable the 3D notification UI
Config.MeDo3DDurationMs = 8000 -- Duration of the 3D notification in milliseconds
Config.MeDo3DHeight = 1.08 -- Height of the 3D notification

Config.DefaultMessageColor = { 255, 255, 175 } -- Default color if a command does not have a single color configured

```

{% endcode %}
{% endtab %}

{% tab title="Commands" %}
{% code expandable="true" %}

```lua

--[[
Here you can see all the commands included in the chat, and you can even easily create new commands. You can see this in the documentation guide:
-> https://jota-dev-documentation.gitbook.io/jota-dev/scripts/chat/add-custom-commands
]]

Config.DynamicCommands = {
    {
        name = 'ooc',
        label = 'OOC',
        help = 'OOC global',
        params = 'message',
        color = "#8fd692",
        templateId = 'default',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true
    },
    {
        name = 'me',
        label = 'ME',
        help = 'Close Action',
        params = 'message',
        color = "#d68f8f",
        templateId = 'me',
        headerDisplay = 0,
        proximityRadius = 15.0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true
    },
    {
        name = 'do',
        label = 'DO',
        help = 'Close Description',
        params = 'message',
        color = "#d1d68f",
        templateId = 'do',
        headerDisplay = 0,
        proximityRadius = 15.0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true
    },
    {
        name = 'ayuda',
        label = 'AYUDA',
        help = 'Global Help',
        params = 'message',
        color = "#d6ba8f",
        templateId = 'ayuda',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true
    },
    {
        name = 'pid',
        label = 'ID',
        help = 'Ask ID',
        params = 'message',
        color = "#a88fd6",
        templateId = 'id',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true
    },
    {
        name = 'twt',
        label = 'TWEET',
        help = 'Send tweet',
        params = 'message',
        color = "#8fc7d6",
        templateId = 'twt',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true
    },
    {
        name = 'anontwt',
        label = 'TWEET ANÓNIMO',
        help = 'Send anonymous tweet',
        params = 'message',
        color = "#8d3440",
        templateId = 'anontwt',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true
    },
    {
        name = 'rpol',
        label = 'INTERNAL RADIO POLICE',
        help = 'Internal Police Radio',
        params = 'message',
        color = "#8faed6",
        templateId = 'rpol',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true,
        jobs = { 'police' }
    },
    {
        name = 'mechanic',
        label = 'Mechanic',
        help = 'Notification Mechanic',
        params = 'mensaje',
        color = "#d3a62a",
        templateId = 'mechanic',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true,
        jobs = { 'mechanic' }
    },
    {
        name = 'police',
        label = 'Command Police',
        help = 'Notification Police',
        params = 'mensaje',
        color = "#4d6cd1",
        templateId = 'police',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true,
        broadcastAll = true,
        jobs = { 'police' }
    },
    {
        name = 'ems',
        label = 'Command Ems',
        help = 'Notification EMS',
        params = 'mensaje',
        color = "#e97d7d",
        templateId = 'ems',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true,
        broadcastAll = true,
        jobs = { 'ambulance' }
    },
    {
        name = 'dados',
        params = {},
        color = "#e8d68f",
        templateId = 'default',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true,
        proximityRadius = 20.0
    },
    {
        name = 'msg',
        label = 'MSG',
        params = { 'ID', 'Message' },
        color = "#8fd69e",
        templateId = 'msg',
        headerDisplay = 1,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true,
        privateMessage = true
    },
    {
        name = 'example',
        label = 'EXAMPLE',
        help = 'Example command with locales',
        params = 'mensaje',
        color = "#9b8fd6",
        templateId = 'example',
        headerDisplay = 0,
        adminOnly = false,
        allowHTML = false,
        blockProfanity = true,
        broadcastAll = false,
        jobs = nil,
        proximityRadius = nil,
        privateMessage = false
    }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

***

<details>

<summary>If you have any questions or problems, do not hesitate to contact us:</summary>

Discord: [`https://discord.gg/EDuZKM7Zuv`](https://discord.gg/EDuZKM7Zuv)

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jota-dev-documentation.gitbook.io/jota-dev/scripts/chat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
