Add radio, phone calls and vehicle intercom to your game resource
For GameLink developers. Send commands 30/31 for radio, 20/21 for phone calls, 32 for towers, 33 for TX indicators and 50/51 for vehicle intercom.
Your game resource turns on radio, phone calls and vehicle intercom by sending GameLink commands. The audio effects run on each player's PC, so they add no load to your server.
The stock FiveM, RedM, RAGE:MP and alt:V resources only send proximity voice and the megaphone. Start from one of them (see the FiveM setup guide) and send these commands from your own scripts.
Sending commands
Commands are JSON messages over a WebSocket to the GameVox desktop app on the player's PC, at ws://127.0.0.1:8088. Each player's game sends its own. The stock resources send from their NUI or CEF page (on alt:V, from the client script).
ServerUniqueIdentifier is a protocol field and does not need to match anything in GameVox. The stock resources use "gamevox".
| Command | Meaning |
|---|---|
| 30 | Start transmitting on a radio |
| 31 | Stop transmitting |
| 20 | Start a phone call |
| 21 | Hang up |
| 32 | Place radio relay towers |
| 33 | Show who is transmitting on the GameVox radar |
| 50 | Player enters a vehicle (intercom on) |
| 51 | Player leaves the vehicle |
Radio (30 and 31)
{
"Command": 30,
"ServerUniqueIdentifier": "your-server-id",
"Parameter": {
"Name": "Officer_Joe",
"SenderRadioType": 1,
"OwnRadioType": 1,
"PlayMicClick": true,
"Volume": 1.0,
"Direct": true,
"SecondaryChannel": false,
"RelayedBy": ""
}
} Name is the transmitting player, as named in your position updates. Radio overrides proximity volume. The primary radio plays in the left ear, the secondary (SecondaryChannel: true) in the right.
SenderRadioType / OwnRadioType | Radio | Max range | Bandpass |
|---|---|---|---|
| 0 | Ultra-Short Range | 1,200 m | 400 to 3,000 Hz |
| 1 | Short Range (handheld) | 5,000 m | 300 to 3,400 Hz |
| 2 | Long Range (vehicle or base) | 20,000 m | 200 to 4,000 Hz |
| 3 | Airborne | 30,000 m | 300 to 3,400 Hz |
Static rises and volume drops near the maximum range.
Phone calls (20 and 21)
Calls play at full volume at any distance, with a 400 to 3,000 Hz filter and no static.
{
"Command": 20,
"ServerUniqueIdentifier": "your-server-id",
"Parameter": {
"Name": "Dispatch",
"SignalStrength": 1.0,
"Volume": 1.0,
"Direct": true,
"RelayedBy": ""
}
} Relay towers (32)
Towers extend radio range and improve signal near them.
{
"Command": 32,
"ServerUniqueIdentifier": "your-server-id",
"Parameter": {
"Towers": [
{ "X": 500.0, "Y": 1200.0, "Z": 50.0, "Range": 8000.0 },
{ "X": -300.0, "Y": 800.0, "Z": 120.0, "Range": 12000.0 }
]
}
} Transmit indicators (33)
Send for each player who keys up, so the radar shows who is transmitting.
{
"Command": 33,
"ServerUniqueIdentifier": "your-server-id",
"Parameter": {
"Name": "Officer_Joe",
"IsSending": true,
"IsPrimaryChannel": true
}
} Vehicle intercom (50 and 51)
Everyone listed hears each other clearly, with no distance falloff.
{
"Command": 50,
"ServerUniqueIdentifier": "your-server-id",
"Parameter": {
"VehicleID": "vehicle_123",
"Occupants": ["Officer_Joe", "Dispatch", "Cadet_Smith"]
}
} Terrain muffling
Set MuffleIntensity (0.0 to 1.0) on each player in the PlayerStates list of a bulk update (Command 9). Single-player updates (Command 8) do not carry it. Your resource decides line of sight with its own raycasts.
{
"Name": "Officer_Joe",
"Position": { "X": 120.0, "Y": 205.0, "Z": 10.0 },
"Rotation": 1.57,
"VoiceRange": 20.0,
"IsAlive": true,
"MuffleIntensity": 0.7
} Players need nothing extra. They run the GameVox desktop app and join the voice channel.
For an overview, see the GameLink radio and phone page.