Radio Chest Animation (FiveM/ FivePD)

I know in FiveM you can keybind keys for radio to shoulder animation. However, I was wondering if there was a script/ code that allows you to keybind an animation to chest radio like LSPDFR offers with GrammerPolice I believe. I think adding this would be unique and different than what you typically see now of days. Link to my video explaining what I mean… GTA5 LSPDFR | LAPD | EP 2 | "little slick" - YouTube
image

Been looking for this to make a resource. If I find it I will let you know

1 Like

Found it.

Dicrt: clothingtie
Anim: outro

Awesome!

THank u!

Know if there is anyway to turn this into a F8 command emote?

Did you get the Emote to work in anyway?

How would the TaskPlayAnim be because its not woking after 2 hours of trying

Try looking up “fivem radio animation” on Google maybe something will pop up. I know they exist just really about testing them I had a friend who had one years ago like 2019.

I have been looking around but didnt really found anything

Interesting I found a few awhile ago.

So re seached every 5 pages on google but havent found anyting

Here I have made a client command to everyone who need this.

RegisterCommand('makeAnim', function()
    local dict, anim = 'clothingtie' , 'outro'
    local ped = PlayerPedId()

    -- Request the animation dict
    RequestAnimDict(dict)
    while not HasAnimDictLoaded(dict) do Wait(10) end

    -- playing the animation at certain time.
    TaskPlayAnim(ped, dict, anim, 8.0, 8.0, -1, 48, 0.15)
    Wait(10)

    -- checking if animation have got to the time point.
    while IsEntityPlayingAnim(ped, dict, anim, 3) do
        Wait(10)
        
        -- if so then freeze
        if GetEntityAnimCurrentTime(ped, dict, anim) >= 0.25 then
            SetEntityAnimSpeed(ped, dict, anim, 0.0)
            break
        end
    end

    -- here you can set your check code instead of this timer.
    local time = 0
    while time < 3 do
        Wait(1000)

        time = time + 1
    end

    -- stoping the animation by calling this
    ClearPedTasks(ped)
end)

So here is the Code for pma-voice if anyone wants!

Thanks @LielXD

RegisterCommand('+radiotalk', function()
	local dict, anim = 'clothingtie' , 'outro'
    local ped = PlayerPedId()
	
	if GetConvarInt('voice_enableRadios', 1) ~= 1 then return end
	if isDead() or LocalPlayer.state.disableRadio then return end

	if not radioPressed and radioEnabled then
		if radioChannel > 0 then
			logger.info('[radio] Start broadcasting, update targets and notify server.')
			playerTargets(radioData, MumbleIsPlayerTalking(PlayerId()) and callData or {})
			TriggerServerEvent('pma-voice:setTalkingOnRadio', true)
			radioPressed = true
			playMicClicks(true)
			if GetConvarInt('voice_enableRadioAnim', 0) == 1 and not (GetConvarInt('voice_disableVehicleRadioAnim', 0) == 1 and IsPedInAnyVehicle(PlayerPedId(), false)) and not disableRadioAnim then
				RequestAnimDict(dict)
				while not HasAnimDictLoaded(dict) do Wait(10) end
			
				-- playing the animation at certain time.
				TaskPlayAnim(ped, dict, anim, 8.0, 8.0, -1, 48, 0.25)
				Wait(10)
			
				-- checking if animation have got to the time point.
				while IsEntityPlayingAnim(ped, dict, anim, 3) do
					Wait(10)
					
					-- if so then freeze
					if GetEntityAnimCurrentTime(ped, dict, anim) >= 0.25 then
						SetEntityAnimSpeed(ped, dict, anim, 0.0)
						break
					end
				end
			end
			CreateThread(function()
				TriggerEvent("pma-voice:radioActive", true)
				while radioPressed and not LocalPlayer.state.disableRadio do
					Wait(0)
					SetControlNormal(0, 249, 1.0)
					SetControlNormal(1, 249, 1.0)
					SetControlNormal(2, 249, 1.0)
				end
			end)
		end
	end
end, false)
1 Like

where would i put this

In the Radio.lua in the client modules