Oh, I am used to VBasic.. lua is still slowly trickling back to me.. but about the returning.. it wouldn't stop it from showing up using this hook. I didn't know he wanted it to block the death notifications.. I just thought he wanted it to ADDITIONALLY display in the chat for admins.
My function will not stop the death notifications in the upper right corner.
Also.. I'll fix the code.. opps
Sorry to ninja this thread a little, but what is the difference in you using local instead of function for your function? Does it just restrict it to that lua file? Because if that's the case then I just learned something new today.. also with the difference in for loops, I can't imagine that the difference would even be that great.
'local' has the affect of declaring a variable's existence from the point it was declared to the end of the block (usually a file or do/then ... end). Since functions are first class variables, the same is true with them, a local function can be used any point after it's declared. This means that if you want two local functions to be able to call each other, you need a bit of a workaround (see code for 'ulx maul').
As far as loops, I've always been pushing people to use ipairs wherever possible instead of pairs, but for some reason ipairs doesn't perform any better than pairs (even checking out the lua source code, I don't understand why this is the case). You
can, however, use a "for i=1, #t do ... end" loop, which iterates ~2x faster.
See this thread: I didn't verify all the data there but from what I could tell in my quick tests his data was pretty good. Actually, I'd recommend 100% against using ipairs anymore since it's being removed from Lua 5.2 (probably because of the performance reason, they want you to use fori instead).