Skip to content

How to add "signatures" to badcoderz

LPN64 edited this page Jan 27, 2020 · 1 revision

If you want to add a signatures to badcoderz here is what you need to do.

If it's a simple function call that should never be called a lot, just go in badcoderz/sh_data.lua

and add it to the BadCoderz.heavy_funcs hashtable.

Everytime it's called in one of the BadCoderz.dangerous_hooks hooks it will be flagged as a code smell.*

You might want to add some documentation to the tooltip table.

If the function call is problematic with static integers/floats (KSHORT/KNUM) you need to add it aswell to the BadCoderz.heavy_funcs_objects table and specify how many integers it has following this example :

[Color] = {
		{
			["Color"] = true,
			["SetDrawColor"] = true
		},
		{true, true, true, false}
	},

Color can be called thu Color and SetDrawColor and has 3 required integers in the parameters and one optional, it will search between 3 (included) and 4 (included) KSHORT/KNUMS parameters.

Clone this wiki locally