I have edited it and it worked fine
Citizen.CreateThread(function()
RequestAnimDict('facials@gen_male@variations@normal')
RequestAnimDict('mp_facial')
local talkingPlayers = {}
while true do
Citizen.Wait(100)
local myId = PlayerId()
for _,player in ipairs(GetActivePlayers()) do
local boolTalking = NetworkIsPlayerTalking(player)
if player ~= myId then
if boolTalking and not talkingPlayers[player] then
PlayFacialAnim(GetPlayerPed(player), 'mic_chatter', 'mp_facial')
talkingPlayers[player] = true
elseif not boolTalking and talkingPlayers[player] then
PlayFacialAnim(GetPlayerPed(player), 'mood_normal_1', 'facials@gen_male@variations@normal')
talkingPlayers[player] = nil
end
end
end
end
end)
4 Likes