T3KTONIT
Well-known member
- Joined
- Sep 2, 2013
- Messages
- 308
- Reaction score
- 5
hello, just found this function and its really helpful. i named it "DebugLog", anyways, its the internal debug/warning/error logger function that samp uses.
and it's the function responsible for printing the startup messages, the warnings(Warning: couldn't create vehicle type: %u), etc...
i figured i could share it with y'all so dat u can use it for debugging and stuff...
and it's the function responsible for printing the startup messages, the warnings(Warning: couldn't create vehicle type: %u), etc...
i figured i could share it with y'all so dat u can use it for debugging and stuff...
Code:
#define SAMP_CHAT_INFO_OFFSET 0x21A0E4
#define SAMP_FUNC_DEBUGLOG 0x64520
typedef int (__cdecl *__DebugLog)(void *g_Chat, char *log, ...);
__DebugLog DebugLog = (__DebugLog)(SAMP + SAMP_FUNC_DEBUGLOG);
//example usage :
void* g_Chat = (void*)*(DWORD*)(SAMP + SAMP_CHAT_INFO_OFFSET);
DebugLog(g_Chat, "This is a test %d %d %d Hello ugbase!", 1, 2, 3);