Skip to content

Latest commit

 

History

History
 
 

fivem_script

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Setting up

The script must be placed in a folder named tokovoip_script (NUI restriction)

You can edit the voip configuration in c_config.lua

You can edit the radio channels in s_config.lua
If the channel name contains 'Call' it will be displayed as a call on the ingame overlay

API Reference


Currently, the radio channels interaction must be done via the client

Client exports

  • addPlayerToRadio(channel)

    Adds the player to a radio channel

    Params type Details
    channel number Id of the radio channel
    isRadio boolean If set to true, channel will be handled as a radio, false will handle the channel as a phone call
  • removePlayerFromRadio(channel)

    Removes the player from a radio channel

    Params type Details
    channel number Id of the radio channel
  • isPlayerInChannel(channel)

    Returns true if the player is in the specified radio channel

    Params type Details
    channel number Id of the radio channel
  • clientRequestUpdateChannels()

    Requests to update the local radio channels

  • setPlayerData(playerName, key, data, shared)

    Sets a data key on the specified player Note: if the data is not shared, it will only be available to the local player

    Params type Details
    playerName string Name of the player to apply the data to
    key string Name of the data key
    data any Data to save in the key
    shared boolean If set to true, will sync through network to all the players
  • getPlayerData(playerName, key)

    Returns the data of matching player and key

    Params type Details
    playerName string Name of the player to retrieve the data from
    key string Name of the data key
  • refreshAllPlayerData(toEveryone)

    Effectively syncs the shared data

    Params type Details
    toEveryone boolean If set to true, the data will be synced to all players, otherwise only to the client who requested it