Raised This Month: $ Target: $400
 0% 

Simulating UTIL_LogPrintf


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PartialCloning
Senior Member
Join Date: Dec 2015
Old 07-22-2017 , 17:58   Re: Simulating UTIL_LogPrintf
Reply With Quote #1

elog_message like log_message would only send at_logged alerts. register_logevent and plugin_log seem to only care about at_logged alerts.

https://github.com/alliedmodders/amx..._api.cpp#L1457

Correct me if I'm wrong, but wouldn't adding the elog_message native be as simple:

Code:
static cell AMX_NATIVE_CALL elog_message(AMX *amx, cell *params) /* 1 param */ {     int len;     g_langMngr.SetDefLang(LANG_SERVER);     char* message = format_amxstring(amx, params, 1, len);     message[len++] = '\n';     message[len] = 0;     ALERT(at_logged, "%s", message);     /* Call C_AlertMessae with the message and let it do the work? */     C_AlertMessage(at_logged, message);     /******************************************************/     return len; }
PartialCloning is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode