[Release] PTTPoliceRadio

Introducing PTTPoliceRadio

This script toggles the police radio animation when the PTT key for your voice application is pushed.
A very special thank you to @sadboilogan for helping write this script.

  • This is NOT a VOIP script
  • Designed to work with DEFAULT police peds only
  • Using MP peds or EUP WILL have varied results - use at your own risk!
  • "Can you make it work with blah, blah, blah?" Short answer, no. Script is provided as is. If you’d like to expand on it to work with ESX jobs for example, all the power to you. Just get permission before making a release.

Controls

Restricted to LEO’s only or other peds specified.

Talk on radio animation:

Your voice application must have a PTT button mapped to this control.

INPUT_CHARACTER_WHEEL (Left ALT by default)

When aiming a weapon, player must release aim when activiating Left ALT and vice versa. Otherwise the animation will not play properly.

Hold weapon holster animation:

INPUT_MULTIPLAYER_INFO (Z by default)

Holster/Unholster Pistol:

When the Pistol is selected it will be removed from the weapon holster and vice versa.

Optional Extras

Install the InteractSound folder into your resources along side PTTPoliceRadio and have mic clicks in-game! All credit for that resource goes to plunkettscott. https://github.com/plunkettscott/FiveM-Scripts

Download

19 Likes

I think in LSPDFR you were able to run while using the radio can someone confirm this?

You can run with it in LSPDFR, I don’t see why you can in this,

It could very well just be a different animation that I was unable to find. If anyone knows what it is, let me know and I’ll be happy to change it.

You have to change the animation flags.

ah crap. Never even thought of that! I’ll get on that now. Thanks.

No problem. may set the flag to 16 + 32?

Nope, got the same result.

1 Like

great script dude nice job works great!!

1 Like

Script has been updated fixing not being able to sprint. It was a combination of the wrong animation flag and the wrong animation itself.

3 Likes
 DisableControlAction( 0, 19, true ) -- INPUT_CHARACTER_WHEEL (LEFTALT)  

Is this where we change the button to our push to talk? :slight_smile:

Not unless you have the same key bound to a control in-game.

1 Like

Yes. Make sure to also change the other 2 values too for the pressed and released.

1 Like

Thank you bro! I love this so much, makes the RP look so so more realistic!

I’m trying to insert a check to see if the player is currently armed (IsPedArmed) and if it returns true, it will play a different animation (aiming and talking on the radio). I’m just not sure how to incorporate this. Anyone have any ideas?

Been trying to do this since the release great work sir!

Not sure how possible that could be, as animations usually stop you from doing anything else. But I could be wrong

Love this, great work good sir! Any plans to do something like this for the “hand on holster” animation?

Isn’t there something like IsPedAiming() or GetSelectedWeapon() not sure though, on mobile right now so I can’t check this.

Check out: https://forum.cfx.re/t/release-leoanimations/49254

1 Like