Giter Site home page Giter Site logo

plactrix / tokovoip_v2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itokoyamato/tokovoip_ts3

5.0 1.0 1.0 128.43 MB

TokoVoIP is a simple FiveM VoIP script that uses TeamSpeak as the voice server

License: Other

JavaScript 1.57% C++ 2.38% C 92.89% Lua 2.66% HTML 0.35% CMake 0.15%

tokovoip_v2's Introduction

Table of Contents

Introduction to TokoVoIP V2

First things first, I would like to clarify I do not own the original code of TokoVoIP. I simply am just maintaining it so server owners can continue using it.

TokoVoIP (originally developed by Itokoyamato) is a FiveM VoIP script that uses TeamSpeak as the voice server allowing for higher quality voice chat. After I saw the countless amount of people requesting the script to come back, I decided to continue development on the script and create a version 2 of it so that others can continue to use the script.

Here are some of the TokoVoIP V2 features:
ㅤ• Higher Quality voice chat audio
ㅤ• Phone Call and Radio Effects (With the integration of RadioFX)
ㅤ• Easy-to-Use TeamSpeak Plugin
ㅤ• Proximity voice chat unique to each player
ㅤ• Maintained Development Updates
ㅤ• Highly Customisable
ㅤ• Cleaner UI
ㅤand much more!

Our To-Do List:

  • Add an option in the config to be able to move the "[TokoVoip]" text around (Top left, Top right, Bottom left, Bottom right, etc)
  • Create an external program so you can connect to toko's radio frequencies (Useful for several things such as dispatchers)
  • Completely recode the TS3 Plugin to use more modern modules
  • Rewrite ws_server with updated dependencies
  • Add a way for users with an ace permission to mute specific people with a command
  • Add an export to enable/disable a player from talking (useful for servers who don't allow talking whilst being dead)
  • Allow radio channels to have x.xx channels instead of whole number channels
  • Add voice echo effects if your in a big room for example
  • Remove all vulnerable events
  • Rework all README's and add an in-depth document page for installation and FAQ
  • Add a fix for players on the same IP (e.g if a player joins the server, and they have a sibling, the sibling won't be able to connect to ts due to the IP being the same)

Our Known-Bugs List:
• ws_server has outdated modules and may not install correctly for some users. We will be recoding this completely to solve this and to enhance performance and optimization.

If you require any assistance with installation, bugs, or anything at all, feel free to create an issue on github or join our Discord server (discord.gg/DEQ95eVmQ3)

If you like TokoVoIP, feel free to leave the original creator a donation (Itokoyamato):

Patreon Donate

TokoVoIP Installation

Firstly, you will need to head over to the Releases page and download ws-server, tokovoip_script and the matching tokovoip-x.x.x.ts3_plugin file.

Setting up the TeamSpeak3 plugin

Every player must install Teamspeak 3 and the TokoVoIP plugin for the script to work correctly

  • Download and Install the appropriate version of the plugin from the Releases page
  • Connect to the FiveM server
  • Launch TeamSpeak3 and connect to the server
  • Join the TeamSpeak3 channel that was set in the fivem script configuration

The TeamSpeak3 Plugin will connect and move you if you are In-Game. If you are not In-Game, you will not be moved or connected
The TeamSpeak3 Plugin will try to connect automatically if you join a TeamSpeak channel containing 'TokoVoIP' in it's name
If you are not automatically connected, you can use the buttons in Plugins -> TokoVoip to manually connect/disconnect the TeamSpeak3 Plugin

Setting up ws-server and tokovoip_script

Step 1: Setting up the ws-server script

  • Download ws-server from the Releases page
  • Extract it in your fivem resources folder
  • Open ws_server/config.js
  • Change "TSServer" to your Teamspeak server IPv4 address
  • start ws_server in your fivem server console
  • Copy the IP:PORT in the console after Listening on and save it for Step 2: Setting up the fivem-script

Step 2: Setting up tokovoip_script

  • Download tokovoip_script from the Releases page
  • Extract it in your fivem resources folder
  • Open tokovoip_script/config.lua
    • Edit wsServer with the IP:PORT you copied from the ws-server console in Step 1: Setting up the ws-server
    • Edit the TSChannel to match your Teamspeak configuration
    • Edit other settings to your preferences
  • Add TokoVoIP to your waiting channel name on your teamspeak server, it is case insensitive

Setting up ws-server as a standalone NodeJS application

ws-server can be setup as a standalone NodeJS application if required. You may run it on the same machine as your FiveM server, or you may decide to run it on a seperate machine. Both will work just fine.

  • Download the latest version of Node.js
  • Open config.js
    • Change "TSServer" to your Teamspeak server IPv4
    • If the ws-server is hosted on a separate machine:
  • Open ws-server folder in cmd / terminal
  • Execute npm i
  • After its done run node index.js
    A module such as systemd, pm2 or screen can be used to run the ws-server application in the background

Onesync Infinity

Onesync infinity is supported with all TokoVoIP V2 versions One thing to keep in mind, Teamspeak servers by default silence everyone when more than 100 users are in a channel
If your server has more then 100 slots, make sure your teamspeak server is configured properly:

  • Right click your teamspeak server
  • Press Edit Virtual Server
  • Press more
  • Open tab Misc
  • Change the value of Min clients in channel before silence

How exactly does TokoVoIP Work?

The system is mainly based on websockets In-game data is sent through websockets to the TS3 plugin FiveM blocks websockets running on the local network, which is why we must use a remote websocket server (in this case, ws-server)

TS3 has no way to know on which fivem server you are currently on locally, a handshake system is required
A master server is used to register handshakes
That is it's only purpose, everything else is run on your own self-hosted ws-server and tokovoip_script

  • Phase 1 - Handshake:
    • tokovoip_script -> ws-server -> register for handshake (master server)
    • ts3-plugin -> look for handshake (master server) -> ws-server

Once the fivem websocket & ts3 websocket successfully handshaked, the master server is not used anymore

  • Phase 2 - Communicate:
    • tokovoip_script -> ws-server -> ts3-plugin
    • tokovoip_script <- ws-server <- ts3-plugin

Ts3 websocket keeps saying Not connected:

  • Make sure your waiting channel has TokoVoIP in the name
  • FiveM and TeamSpeak3 didn't successfuly handshake
  • Make sure your websocket has proper teamspeak, fivem and ws ip
  • Try manually using the connect button in Plugins -> TokoVoIP -> Connect

Could not find dependency yarn for resource ws_server:

Framework Integration

How to Integrate TokoVoIP Into qb-hud:

Simply replace the lines in the client.lua with the ones provided below:

Change This line: local talking = NetworkIsPlayerTalking(playerId) (Roughly line 719)
With this: local talking = exports["tokovoip_script"]:getPlayerData(GetPlayerServerId(PlayerId()), "voip:talking") or 0

Change This line: voice = LocalPlayer.state['proximity'].distance (Roughly line 722)
With this: voice = exports["tokovoip_script"]:getPlayerData(GetPlayerServerId(PlayerId()), "voip:mode") or 0

Change Both of these lines: LocalPlayer.state['radioChannel'] (Roughy lines 746 and 790)
With this: exports["tokovoip_script"]:getPlayerData(GetPlayerServerId(PlayerId()), "radio:channel")


Alternatively you may use my forked qb-hud version, but it may be outdated from the original

Building the TS3 plugin

You will need the following installed:

Clone the repo and don't forget to initialize the submodules:

git submodule update --init --recursive

Then move to the ts3_plugin folder, and generate the Visual Studio solution: (set the correct path to Qt)

mkdir build32
cd build32
cmake -G "Visual Studio 15 2017" -DCMAKE_PREFIX_PATH="<PATH_TO>/Qt/5.12.7/msvc2017" ..
cd ..
mkdir build64
cd build64
cmake -G "Visual Studio 15 2017 Win64"  -DCMAKE_PREFIX_PATH="<PATH_TO>/Qt/5.12.7/msvc2017_64" ..

The visual studio solutions are available in their platform specific folders. You're ready to go !

Packaging the TS3 plugin

Making a TS3 plugin package is very easy, you can use the template in ts3_package if you want. You will need:

  • package.ini file which gives some info about the plugin
  • .dll files in a plugin folder

The .dll should have a suffix _win32 or _win64 matching their target platforms.

Then, archive the whole thing as a .zip file, and rename it to .ts3_plugin.

It's that simple.

Archive tree example:

.
+-- package.ini
+-- plugins
|   +-- tokovoip
|       +-- walkie_talkie16.png
|       +-- mic_click_off.wav
|       +-- mic_click_on.wav
|   +-- plugin_win32.dll
|   +-- plugin_win64.dll

Itokoyamato's Terms and Conditions

A 'TokoVOIP' watermark must be visible on screen. You can move it, change it's design however you like.
Just keep one somewhere. Thanks
For the rest, refer to the license

Dependencies, sources and credits

tokovoip_v2's People

Contributors

cryptogenics avatar dependabot[bot] avatar developerneon avatar flawwsx avatar floppypancakes4u avatar fragaverage avatar frazzie avatar holfz avatar itokoyamato avatar kak-s avatar konscyence avatar mkafrin avatar pichotm avatar plactrix avatar poggicek avatar slasher2099 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

developerneon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.