Hello, I noticed a lot of people have been posting a lot of the “Hand on holster” scripts, so I found the animation for the Hand on your radio! Client.lua:
RegisterNetEvent('Radio')
AddEventHandler('Radio', function()
local ped = GetPlayerPed( -1 )
if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then
Citizen.CreateThread( function()
RequestAnimDict( "random@arrests" )
while ( not HasAnimDictLoaded( "random@arrests" ) ) do
Citizen.Wait( 100 )
end
if IsEntityPlayingAnim(ped, "random@arrests", "generic_radio_chatter", 3) then
ClearPedSecondaryTask(ped)
SetCurrentPedWeapon(ped, GetHashKey("GENERIC_RADIO_CHATTER"), true)
else
TaskPlayAnim(ped, "random@arrests", "generic_radio_chatter", 8.0, 2.5, -1, 49, 0, 0, 0, 0 )
SetCurrentPedWeapon(ped, GetHashKey("GENERIC_RADIO_CHATTER"), true)
end
end )
end
end )
Server.lua:
AddEventHandler( 'chatMessage', function( source, n, msg )
msg = string.lower( msg )
if ( msg == "/r" ) then
CancelEvent()
TriggerClientEvent( 'Radio', source )
end
end )
You want to go to your resources folder, make a new folder called anything (make that folder in the resources) and make a lua file called “client.lua” and another one call “server.lua” copy the code from above and paste into the correct folders
You should really give credit to @Deziel0495, but it’s up too you. Indeed you did find the animation for it but, you basiclly took all of his code and altered only the animation strings. Again you don’t have to but moral, I believe it’s the right thing to do, or at least post this in the original thread.