local ffi = require("ffi")
local hooks = require("hooks")
local originalCChat_AddEntry
local samp = getModuleHandle("samp.dll")
function CChat_AddEntry(this, nType, szText, szPrefix, textColor, prefixColor)
local text = ffi.string(szText)
print(text)
return originalCChat_AddEntry(this, nType, szText, szPrefix, textColor, prefixColor)
end
originalCChat_AddEntry = hooks.jmp.new(
"unsigned int(__thiscall*)(void *this, int nType, const char *szText, const char *szPrefix, unsigned int textColor, unsigned int prefixColor)",
CChat_AddEntry, (samp + 0x67460)
)