Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mGeneral()
- if (!IsValid(dGeneral)) then
- dGeneral = vgui.Create("DFrame")
- dGeneral:SetSize(400, 500)
- dGeneral:Center()
- dGeneral:SetTitle("General Manual")
- dGeneral:SetVisible(true)
- dGeneral:SetDraggable(false)
- --dGeneral:ShowCloseButton(false)
- dGeneral:MakePopup()
- local lTitle = vgui.Create("DLabel", dGeneral)
- lTitle:SetPos(150, 50)
- lTitle:SetSize(100, 45)
- lTitle:SetText("General Manual")
- hook.Add("KeyRelease", "krGeneral", function(ply, key)
- if (key == IN_USE) then
- dGeneral:Close()
- print("general")
- end
- end)
- end
- end
- function mCar()
- if (!IsValid(dCar)) then
- dCar = vgui.Create("DFrame")
- dCar:SetSize(400, 500)
- dCar:Center()
- dCar:SetTitle("General Manual")
- dCar:SetVisible(true)
- dCar:SetDraggable(false)
- --dCar:ShowCloseButton(false)
- dCar:MakePopup()
- local lTitle = vgui.Create("DLabel", dCar)
- lTitle:SetPos(150, 50)
- lTitle:SetSize(100, 45)
- lTitle:SetText("General Manual")
- hook.Add("KeyRelease", "krGeneral", function(ply, key)
- if (key == IN_USE) then
- dCar:Close()
- print("car")
- end
- end)
- end
- end
- function mManual()
- if (!IsValid(dManual)) then
- dManual = vgui.Create("DFrame")
- dManual:SetSize(400, 500)
- dManual:Center()
- dManual:SetTitle("Manual")
- dManual:SetVisible(true)
- dManual:SetDraggable(false)
- --dManual:ShowCloseButton(false)
- dManual:MakePopup()
- local lTitle = vgui.Create("DLabel", dManual)
- lTitle:SetPos(150, 50)
- lTitle:SetSize(100, 45)
- lTitle:SetText("All Purpose Manual")
- local bGeneral = vgui.Create("DButton", dManual)
- bGeneral:SetPos(150, 150)
- bGeneral:SetSize(100, 45)
- bGeneral:SetText("General Manual")
- bGeneral.DoClick = mGeneral
- local bCar = vgui.Create("DButton", dManual)
- bCar:SetPos(150, 200)
- bCar:SetSize(100, 45)
- bCar:SetText("Car Manual")
- bCar.DoClick = mCar
- hook.Add("KeyRelease", "krManual", function(ply, key)
- if (key == IN_USE) then
- dManual:Close()
- end
- end)
- end
- end
- function mMain()
- hook.Add("KeyPress", "kpAllManual", function(ply, key)
- if (ply:KeyDown(IN_USE)) then
- mManual()
- end
- end)
- end
- hook.Add("Think", "tMain", mMain)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement