Simulating UTIL_LogPrintf
Is it possible to send or fake a log message for other plugins to hook through register_logevent? Like "emessage" would.
I'm trying to get plugins using register_logevent to hook roundend to think the round has ended during the round. |
Re: Simulating UTIL_LogPrintf
PHP Code:
Code:
{Write "test" in the server console, the log event will be called. |
Re: Simulating UTIL_LogPrintf
Thank you. Is it possible without Orpheu? I don't usually mind using Orpheu but I'd hate to include it for just a small thing.
|
Re: Simulating UTIL_LogPrintf
I knew you will ask that and you know I'll tell you that including a module is perfectly fine is this module can do the job.
But, to answer your question, I could not find a way without orpheu. UTIL_LogPrintf is using ALERT which is pfnAlertMessage. I tried using EngFunc_AllertMessage and even calling that function with orpheu instead of fakemeta, but it seems like metamod ignores this calls. I did not check more than that, but at a first glance it looks like it's not possible without manually calling C_AlertMessage. |
Re: Simulating UTIL_LogPrintf
We need to add something like eengfunc and edllfunc to fakemeta.
|
Re: Simulating UTIL_LogPrintf
Quote:
|
Re: Simulating UTIL_LogPrintf
elog_message sounds like a more realistic addition. I don't see many if any uses for most of the engfuncs and dllfuncs. I also don't think anyone will want to do all the word involved.
elog_message would be pretty useful and it would have a lot of uses. |
Re: Simulating UTIL_LogPrintf
elog_message as you call it would be eengfunc(EngFunc_AlertMessage). So if it's done for one, it's done for others.
|
Re: Simulating UTIL_LogPrintf
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:
|
Re: Simulating UTIL_LogPrintf
@PartialCloning you should use g_pEngTable like in emessage_begin.
|
| All times are GMT -4. The time now is 22:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.