------------------------------------ -------- CCA Easy Voice Menu ------- ------- Created by: -Prowler- ------ -- Based of the menu by RenZoneNL -- ------------------------------------ if( SERVER ) then return end function CCAMenu() -- Let's declare everything -- Frame = vgui.Create("DFrame") -- Unit Buttons -- local button1 = vgui.Create("DButton") local button2 = vgui.Create("DButton") local button3 = vgui.Create("DButton") local button4 = vgui.Create("DButton") local button5 = vgui.Create("DButton") local button6 = vgui.Create("DButton") local button7 = vgui.Create("DButton") local button8 = vgui.Create("DButton") local button9 = vgui.Create("DButton") local button10 = vgui.Create("DButton") local button11 = vgui.Create("DButton") local button12 = vgui.Create("DButton") local button13 = vgui.Create("DButton") local button14 = vgui.Create("DButton") local button15 = vgui.Create("DButton") local button16 = vgui.Create("DButton") -- Radio Buttons -- local button17 = vgui.Create("DButton") local button18 = vgui.Create("DButton") local button19 = vgui.Create("DButton") local button20 = vgui.Create("DButton") local button21 = vgui.Create("DButton") local button22 = vgui.Create("DButton") local button23 = vgui.Create("DButton") local button24 = vgui.Create("DButton") local button25 = vgui.Create("DButton") local button26 = vgui.Create("DButton") local button27 = vgui.Create("DButton") local button28 = vgui.Create("DButton") local button29 = vgui.Create("DButton") local button30 = vgui.Create("DButton") local button31 = vgui.Create("DButton") -- Dispatch Buttons -- local button32 = vgui.Create("DButton") local button33 = vgui.Create("DButton") local button34 = vgui.Create("DButton") local button35 = vgui.Create("DButton") local button36 = vgui.Create("DButton") local button37 = vgui.Create("DButton") local button38 = vgui.Create("DButton") local button39 = vgui.Create("DButton") -- Other Buttons -- local button40 = vgui.Create("DButton") local button41 = vgui.Create("DButton") local button42 = vgui.Create("DButton") local button43 = vgui.Create("DButton") local button44 = vgui.Create("DButton") local button45 = vgui.Create("DButton") local button46 = vgui.Create("DButton") local button47 = vgui.Create("DButton") local button48 = vgui.Create("DButton") local button49 = vgui.Create("DButton") local button50 = vgui.Create("DButton") local button51 = vgui.Create("DButton") local button52 = vgui.Create("DButton") local button53 = vgui.Create("DButton") local button54 = vgui.Create("DButton") -- Sheets N' Frames -- local PropertySheet = vgui.Create("DPropertySheet") local DFrame1 = vgui.Create("DPanel") local DFrame2 = vgui.Create("DPanel") local DFrame3 = vgui.Create("DPanel") local DFrame4 = vgui.Create("DPanel") -- Setting the frame -- Frame:SetPos(450,50) Frame:SetSize(370,480) Frame:SetTitle("CCA Easy Voice Menu") Frame:ShowCloseButton( true ) Frame:SetVisible( true ) Frame:SetDraggable( true ) Frame:MakePopup() function Frame:Paint() draw.RoundedBox( 0, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0 ,0 ,220 ) ) end -- Sheets -- PropertySheet:SetParent(Frame) PropertySheet:SetPos( 15, 30 ) PropertySheet:SetSize( 340, 430 ) DFrame1:SetPos( 30, 60 ) DFrame1:SetSize( 300, 400 ) DFrame1.Paint = function() surface.SetDrawColor( 0, 0, 0, 150 ) surface.DrawRect( 0, 0, DFrame1:GetWide(), DFrame1:GetTall() ) end DFrame2:SetPos( 120, 60 ) DFrame2:SetSize( 300, 400 ) DFrame2.Paint = function() surface.SetDrawColor( 0, 0, 0, 150 ) surface.DrawRect( 0, 0, DFrame1:GetWide(), DFrame1:GetTall() ) end DFrame3:SetPos( 120, 60 ) DFrame3:SetSize( 300, 400 ) DFrame3.Paint = function() surface.SetDrawColor( 0, 0, 0, 150 ) surface.DrawRect( 0, 0, DFrame1:GetWide(), DFrame1:GetTall() ) end DFrame4:SetPos( 150, 60 ) DFrame4:SetSize( 300, 400 ) DFrame4.Paint = function() surface.SetDrawColor( 0, 0, 0, 150 ) surface.DrawRect( 0, 0, DFrame1:GetWide(), DFrame1:GetTall() ) end --------------------------------------- -- HERE COMES THE BUTTON APOCOLPYPSE -- --------------------------------------- -- Unit Command Buttons -- button1:SetParent(DFrame1) button1:SetText("Citizen") button1:SetPos(10,10) button1:SetSize(150,40) button1.DoClick = function() RunConsoleCommand("say", "Citizen.") RunConsoleCommand("rp_playline", "10") end button2:SetParent(DFrame1) button2:SetText("Move along") button2:SetPos(170,10) button2:SetSize(150,40) button2.DoClick = function() RunConsoleCommand("say", "Move along.") RunConsoleCommand("rp_playline", "37") end button3:SetParent(DFrame1) button3:SetText("Don't move") button3:SetPos(10,55) button3:SetSize(150,40) button3.DoClick = function() RunConsoleCommand("say", "Don't move.") RunConsoleCommand("rp_playline", "17") end button4:SetParent(DFrame1) button4:SetText("I said move along") button4:SetPos(170,55) button4:SetSize(150,40) button4.DoClick = function() RunConsoleCommand("say", "/y I said move along!") RunConsoleCommand("rp_playline", "29") end button5:SetParent(DFrame1) button5:SetText("Move back") button5:SetPos(10,100) button5:SetSize(150,40) button5.DoClick = function() RunConsoleCommand("say", "Move back, right now.") RunConsoleCommand("rp_playline", "38") end button6:SetParent(DFrame1) button6:SetText("I said move") button6:SetPos(170,100) button6:SetSize(150,40) button6.DoClick = function() RunConsoleCommand("say", "I said move.") RunConsoleCommand("rp_playline", "") end button7:SetParent(DFrame1) button7:SetText("Hold it") button7:SetPos(10,145) button7:SetSize(150,40) button7.DoClick = function() RunConsoleCommand("say", "Hold it right there.") RunConsoleCommand("rp_playline", "27") end button8:SetParent(DFrame1) button8:SetText("Go on...") button8:SetPos(170,145) button8:SetSize(150,40) button8.DoClick = function() RunConsoleCommand("say", "Go on...") RunConsoleCommand("rp_playline", "76") end button9:SetParent(DFrame1) button9:SetText("Get out of here") button9:SetPos(10,190) button9:SetSize(150,40) button9.DoClick = function() RunConsoleCommand("say", "Now, get out of here.") RunConsoleCommand("rp_playline", "64") end button10:SetParent(DFrame1) button10:SetText("Come with me") button10:SetPos(170,190) button10:SetSize(150,40) button10.DoClick = function() RunConsoleCommand("say", "Citizen, come with me.") RunConsoleCommand("rp_playline", "57") end button11:SetParent(DFrame1) button11:SetText("You can go") button11:SetPos(10,235) button11:SetSize(150,40) button11.DoClick = function() RunConsoleCommand("say", "Alright, you can go.") RunConsoleCommand("rp_playline", "58") end button12:SetParent(DFrame1) button12:SetText("First warning") button12:SetPos(170,235) button12:SetSize(150,40) button12.DoClick = function() RunConsoleCommand("say", "First warning, move away.") RunConsoleCommand("rp_playline", "20") end button13:SetParent(DFrame1) button13:SetText("SHIT!") button13:SetPos(10,280) button13:SetSize(150,40) button13.DoClick = function() RunConsoleCommand("say", "/y SHIT!") RunConsoleCommand("rp_playline", "72") end button14:SetParent(DFrame1) button14:SetText("Second warning") button14:SetPos(170,280) button14:SetSize(150,40) button14.DoClick = function() RunConsoleCommand("say", "This is your second warning.") RunConsoleCommand("rp_playline", "55") end button15:SetParent(DFrame1) button15:SetText("HELP!") button15:SetPos(10,325) button15:SetSize(150,40) button15.DoClick = function() RunConsoleCommand("say", "/y HELP!") RunConsoleCommand("rp_playline", "24") end button16:SetParent(DFrame1) button16:SetText("Final warning") button16:SetPos(170,325) button16:SetSize(150,40) button16.DoClick = function() RunConsoleCommand("say", "Final warning.") RunConsoleCommand("rp_playline", "19") end -- Radio Command Buttons -- button17:SetParent(DFrame2) button17:SetText("Affirmative") button17:SetPos(10,10) button17:SetSize(150,40) button17.DoClick = function() RunConsoleCommand("say", "/r Affirmative.") RunConsoleCommand("rp_playline", "5") end button18:SetParent(DFrame2) button18:SetText("Roger That") button18:SetPos(170,10) button18:SetSize(150,40) button18.DoClick = function() RunConsoleCommand("say", "/r Roger that.") RunConsoleCommand("rp_playline", "48") end button19:SetParent(DFrame2) button19:SetText("Affirmative 2") button19:SetPos(10,55) button19:SetSize(150,40) button19.DoClick = function() RunConsoleCommand("say", "/r Affirmative.") RunConsoleCommand("rp_playline", "6") end button20:SetParent(DFrame2) button20:SetText("Copy") button20:SetPos(170,55) button20:SetSize(150,40) button20.DoClick = function() RunConsoleCommand("say", "/r Copy.") RunConsoleCommand("rp_playline", "13") end button21:SetParent(DFrame2) button21:SetText("Report Status") button21:SetPos(10,100) button21:SetSize(150,40) button21.DoClick = function() RunConsoleCommand("say", "/r Report status.") RunConsoleCommand("rp_playline", "62") end button22:SetParent(DFrame2) button22:SetText("Moving to hardpoint") button22:SetPos(170,100) button22:SetSize(150,40) button22.DoClick = function() RunConsoleCommand("say", "/r Moving to hardpoint.") RunConsoleCommand("rp_playline", "40") end button23:SetParent(DFrame2) button23:SetText("Lock position") button23:SetPos(10,145) button23:SetSize(150,40) button23.DoClick = function() RunConsoleCommand("say", "/r All units, lock position.") RunConsoleCommand("rp_playline", "") end button24:SetParent(DFrame2) button24:SetText("Investigating 10-103") button24:SetPos(170,145) button24:SetSize(150,40) button24.DoClick = function() RunConsoleCommand("say", "/r Investigating 10-103.") RunConsoleCommand("rp_playline", "28") end button25:SetParent(DFrame2) button25:SetText("Ripcord to me") button25:SetPos(10,190) button25:SetSize(150,40) button25.DoClick = function() RunConsoleCommand("say", "/r Ripcord to my location.") end button26:SetParent(DFrame2) button26:SetText("Control 100%") button26:SetPos(170,190) button26:SetSize(150,40) button26.DoClick = function() RunConsoleCommand("say", "/r Control is one-hundred percent.") RunConsoleCommand("rp_playline", "12") end button27:SetParent(DFrame2) button27:SetText("He's running") button27:SetPos(10,235) button27:SetSize(150,40) button27.DoClick = function() RunConsoleCommand("say", "/r He's running.") RunConsoleCommand("rp_playline", "25") end button28:SetParent(DFrame2) button28:SetText("Sweeping for suspect") button28:SetPos(170,235) button28:SetSize(150,40) button28.DoClick = function() RunConsoleCommand("say", "/r Sweeping for suspect.") RunConsoleCommand("rp_playline", "1") end button29:SetParent(DFrame2) button29:SetText("Repeat message") button29:SetPos(10,280) button29:SetSize(150,40) button29.DoClick = function() RunConsoleCommand("say", "/r 10-9, unable to read last transmission.") end button30:SetParent(DFrame2) button30:SetText("Send medical aid") button30:SetPos(170,280) button30:SetSize(150,40) button30.DoClick = function() RunConsoleCommand("say", "/r 10-78, send medical aid to my location.") RunConsoleCommand("rp_playline", "") end button31:SetParent(DFrame2) button31:SetText("11-99, Officer needs assistance!") button31:SetPos(10,323) button31:SetSize(310,65) button31.DoClick = function() RunConsoleCommand("say", "/r 11-99, Officer needs assistance!") RunConsoleCommand("rp_playline", "3") end -- Dispatch Command Buttons -- button32:SetParent(DFrame3) button32:SetText("Rations are now available") button32:SetPos(10,10) button32:SetSize(310,40) button32.DoClick = function() RunConsoleCommand("say", "/dis Attention Citizens. Rations are now availlable from your union designated distribution terminal. You have one hour to collect your ration. ") end button33:SetParent(DFrame3) button33:SetText("Rations distribution has ended") button33:SetPos(10,55) button33:SetSize(310,40) button33.DoClick = function() RunConsoleCommand("say", "/dis Attention Citizens. Ration distribution has now ended. Vacate the distribution area immediately.") end button34:SetParent(DFrame3) button34:SetText("Inaction is conspiracy") button34:SetPos(10,100) button34:SetSize(310,40) button34.DoClick = function() RunConsoleCommand("rp_dispatch", "9") end button35:SetParent(DFrame3) button35:SetText("Unauthorized velocities") button35:SetPos(10,145) button35:SetSize(310,40) button35.DoClick = function() RunConsoleCommand("say", "/dis Citizen reminder. Traveling at unauthorized velocities is subject to prosecution.") end button36:SetParent(DFrame3) button36:SetText("Cooperation") button36:SetPos(10,190) button36:SetSize(310,40) button36.DoClick = function() RunConsoleCommand("rp_dispatch", "18") end button37:SetParent(DFrame3) button37:SetText("Off-world relocation") button37:SetPos(10,235) button37:SetSize(310,40) button37.DoClick = function() RunConsoleCommand("rp_dispatch", "20") end button38:SetParent(DFrame3) button38:SetText("Anti-Citizen in this community") button38:SetPos(10,280) button38:SetSize(310,40) button38.DoClick = function() RunConsoleCommand("rp_dispatch", "1") end button39:SetParent(DFrame3) button39:SetText("Judgement Waiver now in effect") button39:SetPos(10,325) button39:SetSize(310,40) button39.DoClick = function() RunConsoleCommand("say", "/dis Warning. A Judgement Waiver is now in effect. All citizens must move urgently inside the nearest union sanctioned building.") end -- Ohter/Misc Command Buttons -- button40:SetParent(DFrame4) button40:SetText("Name and CID") button40:SetPos(10,10) button40:SetSize(150,40) button40.DoClick = function() RunConsoleCommand("say", "Look into the scanner, state your name and CID.") end button41:SetParent(DFrame4) button41:SetText("Check console") button41:SetPos(170,10) button41:SetSize(150,40) button41.DoClick = function() RunConsoleCommand("say", "/me looks down at the console, checking the citizens information.") end button42:SetParent(DFrame4) button42:SetText("Green console") button42:SetPos(10,55) button42:SetSize(150,40) button42.DoClick = function() RunConsoleCommand("say", "/it The console screen glows green.") end button43:SetParent(DFrame4) button43:SetText("Red console") button43:SetPos(170,55) button43:SetSize(150,40) button43.DoClick = function() RunConsoleCommand("say", "/it The console screen glows red.") end button44:SetParent(DFrame4) button44:SetText("Face forward") button44:SetPos(10,100) button44:SetSize(150,40) button44.DoClick = function() RunConsoleCommand("say", "Face forward.") end button45:SetParent(DFrame4) button45:SetText("Give ration") button45:SetPos(170,100) button45:SetSize(150,40) button45.DoClick = function() RunConsoleCommand("say", "/me picks a ration up from the pile, walking over to the window and handing it to the citizen.") end button46:SetParent(DFrame4) button46:SetText("On the wall") button46:SetPos(10,145) button46:SetSize(150,40) button46.DoClick = function() RunConsoleCommand("say", "Citizen, get on the wall.") end button47:SetParent(DFrame4) button47:SetText("Pickup the can") button47:SetPos(170,145) button47:SetSize(150,40) button47.DoClick = function() RunConsoleCommand("say", "Pickup the can.") RunConsoleCommand("rp_playline", "65") end button48:SetParent(DFrame4) button48:SetText("Attempt pat-down") button48:SetPos(10,190) button48:SetSize(150,40) button48.DoClick = function() RunConsoleCommand("say", "/me attempts to pat the citizen down.") end button49:SetParent(DFrame4) button49:SetText("Pickup the can 2") button49:SetPos(170,190) button49:SetSize(150,40) button49.DoClick = function() RunConsoleCommand("say", "Pickup the can.") RunConsoleCommand("rp_playline", "66") end button50:SetParent(DFrame4) button50:SetText("Looking for trouble?") button50:SetPos(10,235) button50:SetSize(150,40) button50.DoClick = function() RunConsoleCommand("say", "Looking for trouble?") RunConsoleCommand("rp_playline", "33") end button51:SetParent(DFrame4) button51:SetText("You knocked it over") button51:SetPos(170,235) button51:SetSize(150,40) button51.DoClick = function() RunConsoleCommand("say", "You knocked it over, pick it up.") RunConsoleCommand("rp_playline", "74") end button52:SetParent(DFrame4) button52:SetText("Want a noncompliance?") button52:SetPos(10,280) button52:SetSize(150,40) button52.DoClick = function() RunConsoleCommand("say", "You want a noncompliance verdict?") RunConsoleCommand("rp_playline", "56") end button53:SetParent(DFrame4) button53:SetText("Put it in the trash") button53:SetPos(170,280) button53:SetSize(150,40) button53.DoClick = function() RunConsoleCommand("say", "Now, put it in the trash can.") RunConsoleCommand("rp_playline", "67") end button54:SetParent(DFrame4) button54:SetText("Character Selection") button54:SetPos(10,323) button54:SetSize(310,65) button54.DoClick = function() RunConsoleCommand("setname a") end --------------------------------------- ------ END OF BUTTON APOCOLPYPSE ------ --------------------------------------- -- Sheet settings -- PropertySheet:AddSheet( "Unit Commands", DFrame1, "gui/silkicons/shield", false, false, "Move along." ) PropertySheet:AddSheet( "Radio", DFrame2, "gui/silkicons/group", false, false, "10-4, Rubber Ducky." ) PropertySheet:AddSheet( "Dispatches", DFrame3, "gui/silkicons/world", false, false, "SHOON TIEM?" ) PropertySheet:AddSheet( "Other", DFrame4, "gui/silkicons/user", false, false, "Pick up that can." ) end -- Function to close the menu upon releasing the key -- function MenuHide() Frame:Remove() end -- Command used to open the menu -- concommand.Add("+rp_voicemenu", CCAMenu) concommand.Add("rp_voicemenu", CCAMenu) concommand.Add("-rp_voicemenu", MenuHide)