├── web
├── src
│ ├── vite-env.d.ts
│ ├── index.css
│ ├── main.tsx
│ ├── utils
│ │ ├── fetchNui.ts
│ │ ├── debugData.ts
│ │ └── misc.ts
│ ├── hooks
│ │ └── useNuiEvent.ts
│ ├── providers
│ │ └── VisibilityProvider.tsx
│ └── components
│ │ └── SpeakersMenu.tsx
├── tsconfig.node.json
├── vite.config.ts
├── index.html
├── build
│ └── index.html
├── tsconfig.json
├── package.json
└── pnpm-lock.yaml
├── images
├── low_speaker.png
├── high_speaker.png
└── medium_speaker.png
├── config.lua
├── .vscode
└── settings.json
├── fxmanifest.lua
├── sql.sql
├── README.md
├── locales
├── pt.json
└── en.json
├── client
├── functions.lua
└── main.lua
├── server
└── main.lua
└── LICENSE
/web/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
(events: DebugEvent
[], timer = 1000): void => {
16 | if (import.meta.env.MODE === "development" && isEnvBrowser()) {
17 | for (const event of events) {
18 | setTimeout(() => {
19 | window.dispatchEvent(
20 | new MessageEvent("message", {
21 | data: {
22 | action: event.action,
23 | data: event.data,
24 | },
25 | }),
26 | );
27 | }, timer);
28 | }
29 | }
30 | };
31 |
--------------------------------------------------------------------------------
/web/src/hooks/useNuiEvent.ts:
--------------------------------------------------------------------------------
1 | import { MutableRefObject, useEffect, useRef } from "react";
2 | import { noop } from "../utils/misc";
3 |
4 | interface NuiMessageData