[Release] vVoice v1.2 | Simple proximity Voice Chat resource

voicechat

#42

Currently you need to use commands, you’ll have to edit it yourself if you want to make it a hot key.


#43

is’t easy to do ? ,cuz i never done it before


#44

You’ll have to look into scripting because I don’t have time to do it for you. Or explain you step by step what to do.


#45

LOL My edit :

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        NetworkSetTalkerProximity(prox)
        NetworkClearVoiceChannel()
        NetworkSetVoiceActive(voiceEnabled)
        local playersTalking = {'empty'}
        if voiceEnabled then
            local count = 1
            for i=0,31 do
                if NetworkIsPlayerTalking(i) then
                    playersTalking[count] = GetPlayerName(i)
                    count = count + 1
                end
            end
            if xPlayer.job.name == 'admin' and playersTalking[1] ~= "empty" then
                displayText("Suan Konusan:", 0, 255, 255, 255, 255, 0.5, 0.0)
                count = 0
                for k,v in pairs(playersTalking) do
                    displayText("~f~" .. v, 0, 255, 255, 255, 255, 0.5, 0.025 + (0.025*(count)))
                    count = count + 1
                end
            end
        end
    end
end)

I know put job.name function but I dont know group function…

Can you help me? @Vespura


#46

@Vespura Hi, can I ask what’s happening with a voice chat? I have a server where there is vanilla, there are no scripts and the voice works so that after a few minutes no one will hear

or I hear somebody but he does not


#47

That’s why you should use a voice chat resource.
To make sure it’s enabled and setup in the same channel for everyone.


#48

I’m trying to move this to above the minimap, I have it positioned correctly, but I can’t get it to justify left or wrap into two lines again. Here’s my file:

I tried replacing >“justification” with “left” but I guess that isn’t the correct syntax.

I tried changing:

SetTextWrap (0.0, 1.0) to (1.0, 1.0) AND (1.0, 0.0)

This is what I have now image


#49

If I remove this will it remove the ‘Currently Talking’ ?

function displayText(text, justification, red, green, blue, alpha, posx, posy)
    SetTextFont(4)
    SetTextWrap(0.0, 1.0)
    SetTextScale(1.0, 0.5)
    SetTextJustification(justification)
    SetTextColour(red, green, blue, alpha)
    SetTextOutline()

    BeginTextCommandDisplayText("STRING") -- old: SetTextEntry()
    AddTextComponentSubstringPlayerName(text) -- old: AddTextComponentString
    EndTextCommandDisplayText(posx, posy) -- old: DrawText()
end

Just don’t want that enabled by default :slight_smile:


#50

It’ll crash, because it’s still being called.
Not sure but there might be a config option to just turn this off iirc.


#51

Ill have a look Now, works great


#52
function displayText(text, justification, red, green, blue, alpha, posx, posy)
    SetTextFont(4)
    SetTextWrap(0.0, 1.0)
    SetTextScale(1.0, 0.5)
    SetTextJustification(justification)
    SetTextColour(red, green, blue, alpha)
    SetTextOutline()

    BeginTextCommandDisplayText("STRING") -- old: SetTextEntry()
    AddTextComponentSubstringPlayerName(text) -- old: AddTextComponentString
    EndTextCommandDisplayText(posx, posy) -- old: DrawText()
end

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        NetworkSetTalkerProximity(prox)
        NetworkClearVoiceChannel()
        NetworkSetVoiceActive(voiceEnabled)
        local playersTalking = {'empty'}
        if voiceEnabled then
            local count = 1
            for i=0,31 do
                if NetworkIsPlayerTalking(i) then
                    playersTalking[count] = GetPlayerName(i)
                    count = count + 1
                end
            end
            if playersTalking[1] ~= "empty" then
                displayText("Currently talking:", 0, 255, 255, 255, 255, 0.5, 0.0)
                count = 0
                for k,v in pairs(playersTalking) do
                    displayText("~f~" .. v, 0, 255, 255, 255, 255, 0.5, 0.025 + (0.025*(count)))
                    count = count + 1
                end
            end
        end
    end
end)

I removed this part. Works great! Thanks @Vespura!!!


#53

you removed all of that? because that basically removes every functionality in the resource completely… like setting proximity and channel. it removes that too.

only thing you need to remove is any line that has displayText(<som args>) in it


#54

Ok ill redo it lol seems to work though


#55

Remove this:


#56

Thanks @Vespura :slight_smile: Really appreciate your work and help!


#57

Can you tell me what the problem is?
Screenshot_5


#58

Multiple resources/client mods that add this text. ones I know that have this text: this script, vMenu (if enabled), Lambda Menu (if enabled) but there are probably more.