Skip to content

Commit

Permalink
Merge pull request #139 from Itokoyamato/1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Thuillier committed Jul 12, 2020
2 parents 3f9d93f + 7f4d79a commit 6a81dd9
Show file tree
Hide file tree
Showing 18 changed files with 407 additions and 267 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Introduction: TokoVOIP
TokoVOIP is a TeamSpeak plugin used along a FiveM script to add a custom proximity chat and radio system to [FiveM](https://fivem.net/)

Expand Down Expand Up @@ -26,6 +27,7 @@ You can support my work:
- [(servers) Onesync Infinity](#servers-onesync-infinity)
- [How does it work ?](#how-does-it-work-)
- [Why do I need a ws-server ?](#why-do-i-need-a-ws-server-)
- [TROUBLESHOOTING (only 1.5.2)](#troubleshooting-only-152)
- [Terms and conditions](#terms-and-conditions)
- [Contributing](#contributing)
- [Building the TS3 plugin](#building-the-ts3-plugin)
Expand Down Expand Up @@ -64,7 +66,8 @@ You can use the buttons in `Plugins->TokoVoip` to manually connect/disconnect th
* Edit `wsServer` with the `IP:PORT` you copied from the ws-server console in [**Step 1: Setting up the ws-server**](#step-1-setting-up-the-ws-server)
* Edit the `TSChannel` to match your Teamspeak configuration
* Edit other settings to your preferences
* Open and edit [s_config.lua](https://github.com/Itokoyamato/TokoVOIP_TS3/blob/master/fivem_script/tokovoip_script/s_config.lua) to your preference
* Open and edit [s_config.lua](https://github.com/Itokoyamato/TokoVOIP_TS3/blob/master/fivem_script/tokovoip_script/s_config.lua) to your preference
* Add `tokovoip` to your waiting channel name on your teamspeak server, it is [**case insensitive**](https://www.yourdictionary.com/case-insensitive)

A documentation for the FiveM script is available [here](fivem_script)

Expand Down Expand Up @@ -115,6 +118,20 @@ Read the following:
- [How does it work ?](#how-does-it-work-?)
- [TokoVOIP 1.5.0](https://github.com/Itokoyamato/TokoVOIP_TS3/pull/117)

# TROUBLESHOOTING (only 1.5.2)
**FiveM websocket keeps saying Not connected**:
- FiveM didn't successfuly connect to the websocket server.
- Make sure your websocket port is open
- Make sure firewall isn't blocking your port

**Ts3 websocket keeps saying Not connected**:
- Make sure your **waiting** channel has `tokovoip` in the name
- FiveM and Ts3 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**:
- Install yarn resource from [cfx-server-data repo](https://github.com/citizenfx/cfx-server-data/tree/master/resources/%5Bsystem%5D/%5Bbuilders%5D)
# 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
Expand Down
10 changes: 7 additions & 3 deletions fivem_script/tokovoip_script/c_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TokoVoipConfig = {
networkRefreshRate = 2000, -- Rate at which the network data is updated/reset on the local ped
playerListRefreshRate = 5000, -- Rate at which the playerList is updated
minVersion = "1.5.0", -- Version of the TS plugin required to play on the server
enableDebug = false, -- Enable or disable tokovoip debug (Shift+9)

distance = {
15, -- Normal speech distance in gta distance units
Expand All @@ -28,12 +29,12 @@ TokoVoipConfig = {

-- Optional: TeamSpeak waiting channel name, players wait in this channel and will be moved to the TSChannel automatically
-- If the TSChannel is public and people can join directly, you can leave this empty and not use the auto-move
TSChannelWait = "TokoVOIP Server Waiting Room IPS DESC",
TSChannelWait = "[TokoVOIP] Waiting channel", -- You NEED tokovoip in the wait channel name!

-- Blocking screen informations
TSServer = "ts.yourserver.com", -- TeamSpeak server address to be displayed on blocking screen
TSChannelSupport = "S1: Waiting For Support", -- TeamSpeak support channel name displayed on blocking screen
TSDownload = "https://github.com/Itokoyamato/TokoVOIP_TS3/releases", -- Download link displayed on blocking screen
TSDownload = "https://voip.itokoyamato.net", -- Download link displayed on blocking screen
TSChannelWhitelist = { -- Black screen will not be displayed when users are in those TS channels
"Support 1",
"Support 2",
Expand All @@ -45,6 +46,7 @@ TokoVoipConfig = {
remote_click_on = false, -- Is remote click on sound active
remote_click_off = true, -- Is remote click off sound active
enableStereoAudio = true, -- If set to true, positional audio will be stereo (you can hear people more on the left or the right around you)
-- ClickVolume = -15, -- Set the radio clicks volume, -15 is a good default

localName = "", -- If set, this name will be used as the user's teamspeak display name
localNamePrefix = "[" .. GetPlayerServerId(PlayerId()) .. "] ", -- If set, this prefix will be added to the user's teamspeak display name
Expand All @@ -54,7 +56,9 @@ TokoVoipConfig = {
AddEventHandler("onClientResourceStart", function(resource)
if (resource == GetCurrentResourceName()) then -- Initialize the script when this resource is started
Citizen.CreateThread(function()
TokoVoipConfig.plugin_data.localName = escape(GetPlayerName(PlayerId())); -- Set the local name
if(TokoVoipConfig.plugin_data.localName == '') then
TokoVoipConfig.plugin_data.localName = escape(GetPlayerName(PlayerId())); -- Set the local name
end
end);
TriggerEvent("initializeVoip"); -- Trigger this event whenever you want to start the voip
end
Expand Down
1 change: 0 additions & 1 deletion fivem_script/tokovoip_script/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ client_script "src/c_utils.lua"
client_script "c_config.lua"
client_script "src/c_main.lua"
client_script "src/c_TokoVoip.lua"
client_script "src/nuiProxy.js"

server_script "s_config.lua"
server_script "src/s_main.lua"
Expand Down
211 changes: 114 additions & 97 deletions fivem_script/tokovoip_script/nui/index.html
Original file line number Diff line number Diff line change
@@ -1,105 +1,122 @@
<html>
<head>
<style>
.tokovoipInfo {
position: absolute;
padding: 5px;
font-family:Arial;
font-weight: bold;
color: white;
}
.pluginScreen {
display: none;
position: absolute;
background: rgba(0, 0, 0, 1);
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.pluginScreenWindow {
background: rgba(0, 0, 0, 0.5);
width: 300px;
height: auto;
margin-left: auto;
margin-right: auto;
position: relative;
top: 50%;
transform: translateY(-51%);
border-top: 2px solid #01b0f0;
border-bottom: 2px solid #01b0f0;
padding: 20px;
color: #eee;
font-family: Tahoma, Geneva, sans-serif;
font-size: 12px;
text-shadow: 1px 1px #000000;
font-weight: bold;
}
.talking {
color: rgba(244, 196, 65, 255);
}
.normal {
color: #01b0f0;
}
.copyrights {
padding: 5px;
padding-bottom: 0;
color: white;
opacity: 0.2;
font-size: 12px;
}
</style>
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script src="script.js" type="text/javascript"></script>
</head>
<body>
<div id="pluginScreen" class="pluginScreen">
<div id="pluginScreenWindow" class="pluginScreenWindow">
<div style="font-size:25px;color:#f0eb01;text-align:center;margin-bottom:20px;">
TokoVOIP
</div>
<font color="#01b0f0">TokoVOIP</font> is our in-game VOIP replacement, using a custom made TS Plugin.

<br><br>
<head>
<style>
.tokovoipInfo {
position: absolute;
padding: 5px;
font-family: Arial;
font-weight: bold;
color: white;
}

It give us a lot more <font color="green">possibilities</font>, which currently allow such things as:
<ul>
<li>Better voice quality</li>
<li>Radio system</li>
<li>Proximity chat unique to each player</li>
<li>Phone calls</li>
<li>Radio clicks</li>
<li>Radio effects</li>
</ul>
.pluginScreen {
display: block;
position: absolute;
background-image: radial-gradient(rgb(23, 23, 23), rgb(0, 0, 0));
width: 100%;
height: 100%;
top: 0;
left: 0;
}

<br>
.pluginScreenWindow {
background: rgba(0, 0, 0, 0.5);
width: 350px;
height: auto;
margin-left: auto;
margin-right: auto;
position: relative;
top: 50%;
transform: translateY(-51%);
border-left: 2px solid #989898;
padding: 20px;
color: #eee;
font-family: Tahoma, Geneva, sans-serif;
font-size: 12px;
text-shadow: 1px 1px #000000;
font-weight: bold;
}

<font color="#01b0f0">TokoVOIP</font> has to be <font color="red">installed</font> and <font color="red">running</font> to play on our servers.
<br><br>
If you cannot join the appropriate server channel, please join <font color="#01b0f0" id="TSChannelSupport"></font> channel in teamspeak, so that a support team member can help you.
<br><br>
You can find more <font color="#f0eb01">information</font> and <font color="#f0eb01">download</font> links at: <font color="#01b0f0" id="TSDownload">https://github.com/Itokoyamato/TokoVOIP_TS3/releases</font>
<br><br><br>
.talking {
color: rgba(244, 196, 65, 255);
}

<div id="TSServer">
TeamSpeak server:
</div>
<div id="TSChannel">
TeamSpeak channel:
</div>
<br>
<div id="pluginStatus">
Plugin status:
</div>
<div id="pluginVersion">
Plugin version:
</div>
.normal {
color: #01b0f0;
}

.copyrights {
padding: 5px;
padding-bottom: 0;
color: white;
opacity: 0.2;
font-size: 12px;
}

ul {
padding-inline-start: 27px;
margin-block-start: 6px;
}
</style>
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script src="script.js" type="text/javascript"></script>
</head>

<body>
<div id="pluginScreen" class="pluginScreen">
<div id="pluginScreenWindow" class="pluginScreenWindow">
<div style="font-size:25px;color:#ffffffab;text-align:center;margin-bottom:20px;">
TokoVOIP 1.5
</div>
<font style="color: #ffffffab;">TokoVOIP</font> is our in-game VOIP replacement, using a custom made TS Plugin.

<br><br>

It give us a lot more possibilities, which currently allow such things as:
<ul>
<li>Better voice quality</li>
<li>Radio system</li>
<li>Proximity chat unique to each player</li>
<li>Phone calls</li>
<li>Radio clicks</li>
<li>Radio effects</li>
</ul>

<font style="color: #ffffffab">TokoVOIP</font> has to be <font color="#d62323">installed</font> and <font
color="#d62323">
running
</font> to play on our servers.
<br><br>
You can find more <font color="#f0eb01">information</font> and <font color="#f0eb01">download</font> links at:
<font color="#1a79ff" id="TSDownload">https://voip.itokoyamato.net/</font>
<br><br>

<div id="TSServer">
TeamSpeak server:
</div>
<div id="TSChannel">
TeamSpeak channel:
</div>
<br>
Status:
<ul>
<li id="pluginStatus">Plugin status: <font color="red">OFFLINE</font>
</li>
<li id="FiveMState">FiveM websocket: <font color="red">Not connected</font>
</li>
<li id="Ts3State">Ts3 websocket: <font color="red">Not connected</font>
</li>
<br />
<li id="pluginVersion">Plugin version: <font color="red">Not found</font> (Required: 1.5.0)</li>
</ul>
</div>
<div class="copyrights">
TokoVoip by Itokoyamato
</div>
<div id="tokovoipInfo" class="tokovoipInfo">
</div>
</body>
</html>
</div>
<div class="copyrights">
TokoVoip by Itokoyamato
</div>
<div id="tokovoipInfo" class="tokovoipInfo">
</div>
</body>

</html>
Loading

0 comments on commit 6a81dd9

Please sign in to comment.