Id also like to be able make this work with EUP server side.
People die when in water and use the radio
So when i add the mp_m_freemode_01 it adds the vest but when i unholster it the vest goes away any way i can fix that?
You can’t wear a EUP vest with this mod.
I can only do it one second then i get cuffed
Yes you can, just adjust the code
For those using ESX or custom Peds since author wrote you cannot release his code I’m making a comment here on what I did for my server.
First thank you Dezuek0495 and any others whom help make this.
Let’s begin.
First add this to Skins
local skins = {
"mp_f_freemode_01",
"mp_m_freemode_01",
}
Secondly for the radio to work for MP peds you need to disable the “grey body”
you can delete or just comment out lines for
SetPedComponentVariation(ped, 9, 1, 0, 0)
Secondly Add this code
Citizen.CreateThread(function()
while true do
Citizen.Wait( 0 )
local ped = PlayerPedId()
if DoesEntityExist( ped ) and not IsEntityDead( ped ) and CheckSkin(ped) and PlayerData.job ~= nil and PlayerData.job.name == 'police' then
if not IsPauseMenuActive() then
loadAnimDict( "random@arrests" )
if IsPedInAnyVehicle(PlayerPedId(), false) then
print('In Vehicle')
if IsControlJustReleased( 0, Keys['CAPS'] ) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
--TriggerServerEvent('InteractSound_SV:PlayOnSource', 'off', 0.1)
ClearPedTasks(ped)
--SetEnableHandcuffs(ped, false)
else
if IsControlJustPressed( 0, Keys['CAPS'] ) and CheckSkin(ped) and not IsPlayerFreeAiming(PlayerId()) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
--TriggerServerEvent('InteractSound_SV:PlayOnSource', 'on', 0.1)
TaskPlayAnim(ped, "random@arrests", "generic_radio_chatter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 )
--SetEnableHandcuffs(ped, true)
SetCurrentPedWeapon(ped, GetHashKey("GENERIC_RADIO_CHATTER"), true)
print('Not AIM')
elseif IsControlJustPressed( 0, Keys['CAPS'] ) and CheckSkin(ped) and IsPlayerFreeAiming(PlayerId()) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
--TriggerServerEvent('InteractSound_SV:PlayOnSource', 'on', 0.1)
TaskPlayAnim(ped, "random@arrests", "radio_chatter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 )
SetCurrentPedWeapon(ped, GetHashKey("GENERIC_RADIO_CHATTER"), true)
--SetEnableHandcuffs(ped, true)
end
if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests", "generic_radio_chatter", 3) then
DisableActions(ped)
elseif IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests", "radio_chatter", 3) then
DisableActions(ped)
end
end
else
print('Not In Vehicle')
if ( IsControlJustReleased( 0, Keys['CAPS'] ) or IsDisabledControlJustReleased( 0, Keys['CAPS'] ) ) and GetLastInputMethod( 0 ) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
--TriggerServerEvent('InteractSound_SV:PlayOnSource', 'off', 0.1)
ClearPedTasks(ped)
--SetEnableHandcuffs(ped, false)
else
if ( IsControlJustPressed( 0, Keys['CAPS'] ) or IsDisabledControlJustPressed( 0, Keys['CAPS'] ) ) and GetLastInputMethod( 0 ) and CheckSkin(ped) and not IsPlayerFreeAiming(PlayerId()) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
--TriggerServerEvent('InteractSound_SV:PlayOnSource', 'on', 0.1)
TaskPlayAnim(ped, "random@arrests", "generic_radio_chatter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 )
--SetEnableHandcuffs(ped, true)
SetCurrentPedWeapon(ped, GetHashKey("GENERIC_RADIO_CHATTER"), true)
print('Not AIM')
elseif ( IsControlJustPressed( 0, Keys['CAPS'] ) or IsDisabledControlJustPressed( 0, Keys['CAPS'] ) ) and GetLastInputMethod( 0 ) and CheckSkin(ped) and IsPlayerFreeAiming(PlayerId()) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
--TriggerServerEvent('InteractSound_SV:PlayOnSource', 'on', 0.1)
TaskPlayAnim(ped, "random@arrests", "radio_chatter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 )
SetCurrentPedWeapon(ped, GetHashKey("GENERIC_RADIO_CHATTER"), true)
--SetEnableHandcuffs(ped, true)
end
if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests", "generic_radio_chatter", 3) then
DisableActions(ped)
elseif IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests", "radio_chatter", 3) then
DisableActions(ped)
end
end
end
end
end
end
end )
If you notice I just commented out the lines of code I didn’t need and plus I added a check for vehicles reason was some user used controllers and the A button was tied with CAPS so I had to make that check to able to use the controller A button in cars and disable it when not in cars
Proof -
I’m not the developer of my server, just kind of the one looking for the fix.
This animation cancels the existing animation - whether you’re in cover, or doing well, anything else. Is there a way to stop it from cancelling animations, so that an officer can still be in cover on a scene, calling out on a radio?
Otherwise, this is awesome, we have it fully functional in our server and it definitely tops what we were using before.
PLEASE HELP
Anyone willing to share a snippet to only make this work with the police job in ESX?
I know this has been around for a while, but I’m using vMenu v2.0.0 MP ped customization, I put all the police peds in the client.lua, it works and everything but only problem, is it won’t let me use vests with the mod enabled.
The Holster work on our server the Radio animation doesnt. Any ideas?
How can we make the Hold weapon holster Toggle instead of Push?
is there a way to whitelist this code by restricting it to certain Hex ID’s?
You can check if a player has a certain job grade, this requires ESX though.
How do I restrict the radio only to the police?
Have you tried changing the key bind to see if its a problem with a conflicting script?
edit:
Just tested this out yes it conflicts with the holster action when i changed the key bind to x keybind it worked.
It already has police ped restrictions.
I don’t use peds, I mean, for the Police job :))
We tried to. Even adding a command and it still doesnt work.