Setup voice indicator with TokoVoIP [not this version] - Xxpromw3mtxX/cosmo_hud GitHub Wiki

  1. Install TokoVoIP
  2. Go to tokovoip_script/src
  3. Open the file c_TokoVoip.lua and search for the function function TokoVoip.updateTokoVoipInfo(self, forceUpdate) around line 55-56
  4. Before the end add this code:
exports['cosmo_hud']:Voicelevel(self.mode)
  1. Then open the file c_main.lua and search for the function RegisterNUICallback("setPlayerTalking", function(data, cb) around line 62-63
  2. 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)
  1. You're set!