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

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

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.

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

1 Like

@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

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

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

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:

1 Like

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

1 Like

Ill have a look Now, works great

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!!!

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

1 Like

Ok ill redo it lol seems to work though

Remove this:

1 Like

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

Can you tell me what the problem is?
Screenshot_5

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.

Update 17-12-2018

I will no longer be maintaining/supporting this resource. The GitHub repo has been archived. Fork it if you want to update it yourself.

How can i change the color of Speaking and id?

Currently Talking
line 142 displayText("Currently talking:", 0, 255, 255, 255, 255, 0.5, 0.0)
change the rgba values.

Name
line 145 displayText("~f~" .. v, 0, 255, 255, 255, 255, 0.5, 0.025 + (0.025*(count)))
change the rgba values.

and where i can find all rgba values?
i need green and rainbow