Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile()
- print("VOIP FX - Military")
- resource.AddFile( "jessev92/ui/cop_radio_on.wav" )
- util.PrecacheSound( "jessev92/ui/cop_radio_on.wav" )
- local chirpOn = Sound("jessev92/ui/cop_radio_on.wav")
- resource.AddFile( "jessev92/ui/cop_radio_off.wav" )
- util.PrecacheSound( "jessev92/ui/cop_radio_off.wav" )
- --local chirpOff = Sound("jessev92/ui/cop_radio_off.wav")
- local chirpOff = Sound("jessev92/ui/cop_radio_on.wav")
- local filterGround = Sound("BF2_Filter_Ground_Cut")
- local filterCommander = Sound("BF2_Filter_Commander_Cut")
- local filterVehicle = Sound("BF2_Filter_Vehicle_Cut")
- local filterPlane = Sound("BF2_Filter_Aircraft_Cut")
- local filterHeli = Sound("BF2_Filter_Helicopter_Cut")
- sound.Add( {
- name = "BF2_Filter_Ground",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/ground.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/ground.wav")
- sound.Add( {
- name = "BF2_Filter_Ground_Cut",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/ground_cut.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/ground_cut.wav")
- sound.Add( {
- name = "BF2_Filter_Commander",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/commander.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/commander.wav")
- sound.Add( {
- name = "BF2_Filter_Commander_Cut",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/commander_cut.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/commander_cut.wav")
- sound.Add( {
- name = "BF2_Filter_Vehicle",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/vehicle.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/vehicle.wav")
- sound.Add( {
- name = "BF2_Filter_Vehicle_Cut",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/vehicle_cut.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/vehicle_cut.wav")
- sound.Add( {
- name = "BF2_Filter_Aircraft",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/aircraft.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/aircraft.wav")
- sound.Add( {
- name = "BF2_Filter_Aircraft_Cut",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/aircraft_cut.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/aircraft_cut.wav")
- sound.Add( {
- name = "BF2_Filter_Helicopter",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/helicopter.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/helicopter.wav")
- sound.Add( {
- name = "BF2_Filter_Helicopter_Cut",
- channel = CHAN_STATIC,
- volume = 1.0,
- level = 0,
- //pitchstart = 90,
- //pitchend = 110,
- sound = { "jessev92/bf2/filter/helicopter_cut.wav"}
- } )
- util.PrecacheSound("jessev92/bf2/filter/helicopter_cut.wav")
- local heliFilterTable = { "wac_hc_206b",
- "wac_hc_206b_amphib",
- "wac_hc_ah1w",
- "wac_hc_ah1z",
- "wac_hc_ah64d_longbow",
- "wac_hc_blackhawk_uh60",
- "wac_hc_ch46_seaknight",
- "wac_hc_ch47_chinook",
- "wac_hc_ec655",
- "wac_hc_falcon",
- "wac_hc_hebullet",
- "wac_hc_hornet",
- "wac_hc_ka50",
- "wac_hc_littlebird_ah6",
- "wac_hc_littlebird_mh6",
- "wac_hc_mh53_pavelow",
- "wac_hc_mi17",
- "wac_hc_mi28_havoc",
- "wac_hc_mi35",
- "wac_hc_mm1_av8b",
- "wac_hc_mv22",
- "wac_hc_oh58_kiowa",
- "wac_hc_pelican",
- "wac_hc_r22",
- "wac_hc_rah66",
- "wac_hc_raven_oh23",
- "wac_hc_rocket",
- "wac_hc_s64",
- "wac_hc_uh1d",
- "wac_hc_uh1y_venom",
- "wac_hc_uh60lau61ca",
- "wac_v92_vdf_vc24",
- "wac_hc_*",
- "wac_hc_vdf_*",
- "wac_vdf_*",
- "wac_v92_*",
- "wac_v92_vdf_*",
- }
- local jetFilterTable = { "wac_pl_a6m2",
- "wac_pl_a10",
- "wac_pl_b17g",
- "wac_pl_bd5j",
- "wac_pl_bf109",
- "wac_pl_c130",
- "wac_pl_c172",
- "wac_pl_dh98",
- "wac_pl_f4",
- "wac_pl_f16",
- "wac_pl_f86",
- "wac_pl_fa18",
- "wac_pl_fw190",
- "wac_pl_hawx_fa22",
- "wac_pl_jenny",
- "wac_pl_ju87",
- "wac_pl_mm1_av8b",
- "wac_pl_p39",
- "wac_pl_p40",
- "wac_pl_p51",
- "wac_pl_sbu1",
- "wac_pl_spitfire",
- "wac_pl_t45",
- "wac_pl_ultralight",
- "wac_v92_vdf_a10",
- "wac_v92_vdf_c130",
- "wac_v92_vdf_f4",
- "wac_pl_*",
- "wac_pl_vdf_*",
- "wac_vdf_*",
- "wac_v92_*",
- "wac_v92_vdf_*",
- }
- --if CLIENT then
- --elseif (_C:InVehicle() and _C:GetVehicle() == heliFilterTable ) then
- --elseif (_C:InVehicle() and _C:GetVehicle() == jetFilterTable ) then
- local function PlayerStartVoice( _P )
- local _C = LocalPlayer()
- if ( _P:IsPlayer() and _P:Alive() ) then
- _C:EmitSound(chirpOn)
- if _C:InVehicle() and _C:GetVehicle():GetClass():find("sent_sakarias_car_") then
- _C:EmitSound(filterVehicle)
- elseif _C:InVehicle() and _C:GetVehicle().aircraft:GetClass():find("wac_hc_") then
- _C:EmitSound(filterHeli)
- elseif _C:InVehicle() and _C:GetVehicle().aircraft:GetClass():find("wac_pl_") then
- _C:EmitSound(filterPlane)
- elseif _C:GetMoveType() == MOVETYPE_NOCLIP then
- _C:EmitSound(filterCommander)
- else
- _C:EmitSound(filterGround)
- end
- end
- end
- hook.Add( "PlayerStartVoice", "PlayerStartedTheirVoiceCop", PlayerStartVoice)
- local function PlayerEndVoice( _P )
- local _C = LocalPlayer()
- if ( _P:IsPlayer() or !_P:Alive() ) then
- _C:EmitSound(chirpOff)
- if _C:InVehicle() and _C:GetVehicle():GetClass():find("sent_sakarias_car_") then
- _C:StopSound(filterVehicle)
- elseif _C:InVehicle() and _C:GetVehicle().aircraft:GetClass():find("wac_hc_") then
- _C:StopSound(filterHeli)
- elseif _C:InVehicle() and _C:GetVehicle().aircraft:GetClass():find("wac_pl_") then
- _C:StopSound(filterPlane)
- elseif (_C:GetMoveType() == MOVETYPE_NOCLIP) then
- _C:StopSound(filterCommander)
- else
- _C:StopSound(filterGround)
- end
- end
- end
- hook.Add( "PlayerEndVoice", "PlayerEndedTheirVoiceCop", PlayerEndVoice)
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement