Setup voice indicator with TokoVoIP [not this version] - Xxpromw3mtxX/cosmo_hud GitHub Wiki
- Install TokoVoIP
- Go to
tokovoip_script/src
- Open the file
c_TokoVoip.lua and search for the function function TokoVoip.updateTokoVoipInfo(self, forceUpdate) around line 55-56
- Before the
end add this code:
exports['cosmo_hud']:Voicelevel(self.mode)
- Then open the file
c_main.lua and search for the function RegisterNUICallback("setPlayerTalking", function(data, cb) around line 62-63
- Replace the code from line 63 to line 84 with this code:
RegisterNUICallback("setPlayerTalking", function(data, cb)
voip.talking = tonumber(data.state);
if (voip.talking == 1) then
setPlayerData(voip.serverId, "voip:talking", 1, true);
PlayFacialAnim(GetPlayerPed(PlayerId()), "mic_chatter", "mp_facial");
exports['cosmo_hud']:isTalking(voip.talking)
else
setPlayerData(voip.serverId, "voip:talking", 0, true);
PlayFacialAnim(PlayerPedId(), "mood_normal_1", "facials@gen_male@base");
exports['cosmo_hud']:isTalking(voip.talking)
end
cb('ok');
end)
- You're set!