Add TokoVoIP Support#201
Closed
GamingLuke1337 wants to merge 5 commits into
Closed
Conversation
Author
|
linting check is happy now :) |
ChristianBDev
suggested changes
Jul 28, 2025
Contributor
ChristianBDev
left a comment
There was a problem hiding this comment.
Fix changes, if need assistance I will assist
Comment on lines
+717
to
+728
| if GetResourceState(Config.TokoResource) == "started" then | ||
| talking = exports[Config.TokoResource]:getPlayerData(GetPlayerServerId(PlayerId()), "voip:talking") or 0 | ||
| else | ||
| talking = NetworkIsPlayerTalking(playerId) | ||
| end | ||
|
|
||
| if GetResourceState(Config.TokoResource) == "started" then | ||
| voice = exports[Config.TokoResource]:getPlayerData(GetPlayerServerId(PlayerId()), "voip:mode") or 0 | ||
| else | ||
| if LocalPlayer.state['proximity'] then | ||
| voice = LocalPlayer.state['proximity'].distance | ||
| end |
Contributor
There was a problem hiding this comment.
Why not put in one check? Also, just check if GetResourceState("tokovoip_script") == "started" then do that else do this
if GetResourceState(Config.TokoResource) == "started" then
talking = exports[Config.TokoResource]:getPlayerData(GetPlayerServerId(PlayerId()), "voip:talking") or 0
voice = exports[Config.TokoResource]:getPlayerData(GetPlayerServerId(PlayerId()), "voip:mode") or 0
else
if LocalPlayer.state['proximity'] then
voice = LocalPlayer.state['proximity'].distance
end
talking = NetworkIsPlayerTalking(playerId)
end| Config.MinimumSpeedUnbuckled = 50 -- Going Over This Speed Unbuckled Will Cause Stress | ||
| Config.MinimumSpeed = 100 -- Going Over This Speed While Buckled Will Cause Stress | ||
| Config.DisableStress = false -- If true will disable stress completely for all players | ||
| Config.TokoResource = 'tokovoip_script' -- If TokoVoIP is found it will use it to determine if the player is talking |
Contributor
There was a problem hiding this comment.
Make this a bool to check if Tokovoip is started then it runs tokovoip stuff else, it will default to normal.
Contributor
|
Better yet I believe should suffice instead of adding a config option, but dont think the hud should allow this, more of a change on your side for a server if GetResourceState('tokovoip') == "started" then
talking = exports['tokovoip']:getPlayerData(GetPlayerServerId(PlayerId()), "voip:talking") or 0
voice = exports['tokovoip']:getPlayerData(GetPlayerServerId(PlayerId()), "voip:mode") or 0
else
if LocalPlayer.state['proximity'] then
voice = LocalPlayer.state['proximity'].distance
end
talking = NetworkIsPlayerTalking(playerId)
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for TokoVoIP. It would be a nice-to-have Integration.
i can also add another config option for diasbling this check, if required.
Checklist