modules Override (e.g. today's broken numpad)

Ever had that moment when a update broke some lua module? Waiting for it to get fixed? Some module just doesn’t work the way you want?
[release]Presenting you, modulesOverride:

Description
Overrides modules runtime (on both client and server) that you drop in includes/modules_override folder before they are required by most plugins (if not all).

Download
(svn only since this is the easiest for us to update. In fact this svn is directly from our server)
svn://anon:anon@99.191.111.120/srvaddons/modulesOverride

Example overrides included.

[/release]No guarantees of anything.

Updates to this may happen at any point. Especially to the example modules. Original functionality is not guaranteed but usually retained.

[lua]
[lua\includes\modules
umpad.lua:52] attempt to call global ‘IsValid’ (a nil value)
[/lua]

[lua]
local function GetPlayerIndex( ply )

if ( !IsValid( ply ) ) then return 0; end

return ply:UniqueID()

end
[/lua]
Why isn’t the IsValid working? :colbert:

if you know how modules work, he didn’t localize IsValid

Okay 108 is released fixing the numpad bug. That was a quick fix :v:

I wrote some parts of some of the edits.

The concommand module override allows you to hook to a hook called LuaCommand. That hook has 3 arguments (player, command, arguments) so when you return false in it, it will not allow the lua command to run.

The hook module has 3 commands, hooks_disable_all, hooks_enable_all and hooks_profile, I made the profiling feature for it. You type “hooks_profile 1” in the console and it starts measuring time it took between each hook to run. This outputs something like this:

http://iriz.pastebin.com/dsi8mgpf

(I enabled it while typing this post (unfocused gmod) so it might not be entirely accurate)

below is what python made

The timer module just show verbose errors instead of just “Timer simple error!”

and the rest I don’t know.

That’s pretty cool CapsAdmin, I can think of many uses for it.

Oh and by the way, the average output is in seconds. (* 1000)