QBESXStandalone
Agency-Chat Экспорты & API
Чат для вашего сервера FiveM в стиле Agency, в едином оформлении с Agency Notify и Agency Progressbar.
v1.2.0Платно5 Страницы

01Клиентские экспорты
| Экспорт | Описание |
|---|---|
exports.chat:addMessage(message) | Adds a message to the own chat, same table as chat:addMessage (args, color, template). Optional agency = { tag, tone } gives it the Agency tag look. |
exports.chat:addSuggestion(name, help, params) | Adds a command suggestion with help text and parameters, same as chat:addSuggestion. |
exports.chat:isOpen() | true while the chat input is open. |
02Серверные экспорты
| Экспорт | Описание |
|---|---|
exports.chat:addMessage(target, message) | Sends a message to one player (-1 for everyone), same table as chat:addMessage. |
exports.chat:registerMessageHook(function(source, outMessage, hookRef) end) | Sees and changes every typed message before it goes out, like the default chat. hookRef.cancel() stops it. |
exports.chat:registerMode({ name, displayName, color, seObject, cb }) | Adds a chat mode players switch to with Tab, like the default chat. |
03События
| Название | Сторона | Описание |
|---|---|---|
chat:addMessage | Клиент | Default chat event, works unchanged. TriggerClientEvent('chat:addMessage', source, { args = { 'SYSTEM', 'Hello' } }). |
chatMessage | Клиент | Old default chat event (author, color, text), works unchanged. |
chat:addSuggestion | Клиент | Default event for one command suggestion. chat:addSuggestions and chat:removeSuggestion work as well. |
chat:addTemplate | Клиент | Default event for message templates, works unchanged. |
chat:addMode / chat:removeMode | Клиент | Default events for chat modes, work unchanged. |
chat:clear | Клиент | Clears the chat of this player. |