-
Notifications
You must be signed in to change notification settings - Fork 201
Add TokoVoIP Support #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TokoVoIP Support #201
Conversation
|
linting check is happy now :) |
ChristianBDev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix changes, if need assistance I will assist
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a bool to check if Tokovoip is started then it runs tokovoip stuff else, it will default to normal.
|
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 |
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