local policeTeam = {TEAM_POLICE,TEAM_SWAT,TEAM_CHIEF} hook.Add("Think","PlayerWillEarDYou",function() for k,v in pairs(player.GetAll()) do if CLIENT then if(input.IsKeyDown(KEY_B) ) then if(table.HasValue(policeTeam,v:Team())) then v.policeRadio = true v:ConCommand("+voicerecord") end elseif(v.policeRadio == true) then v.policeRadio = false v:ConCommand("-voicerecord") end end end end) if CLIENT then hook.Add("PlayerCanHearPlayersVoice", "PoliceVoices", function(a,b) if(a.policeRadio == true && table.HasValue(policeTeam,b:Team())) then return true end if(a.policeRadio == true) then return false end end) local radioPic = nil hook.Add("HUDPaint","DrawOverlay",function() local ply = LocalPlayer() if(ply.policeRadio == true) then if(radioPic == nil) then radioPic = vgui.Create( "SpawnIcon") radioPic:SetPos( 20, ScrH()/24 ) radioPic:SetSize(ScrW()/16,ScrW()/16) radioPic:SetModel( "models/props_lab/citizenradio.mdl" ) ply:EmitSound("npc/metropolice/vo/on"..math.random(1,2)..".wav",30) end else if(radioPic != nil) then radioPic:Remove() radioPic = nil ply:EmitSound("npc/metropolice/vo/off"..math.random(1,4)..".wav",30) end end end) end