Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local panel_events = {
- "OnCursorEntered",
- }
- gftb_old_vgui_Register = gftb_old_vgui_Register or vgui.Register
- function vgui.Register(a, PANEL, ...)
- if type(PANEL) == "table" then
- for _, event in pairs(panel_events) do
- if PANEL[event] then
- local old = PANEL[event]
- PANEL[event] = function(...)
- if hook.Call("Panel" .. event, nil, ...) ~= false then
- return old(...)
- end
- end
- end
- end
- end
- return gftb_old_vgui_Register(a, PANEL, ...)
- end
- hook.Add("PanelOnCursorEntered", "gmod_for_the_blind", function(self)
- if type(self.GetValue) == "function" and self:GetValue() then
- chatsounds.Say(LocalPlayer(), tostring(self:GetValue()), tostring(self:GetValue()))
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment