View Single Post
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-26-2018 , 15:10   get_user_msgid() fails to work on server startup?
Reply With Quote #1

I just noticed something weird. I made a simple code to demonstrate.

PHP Code:
#include <amxmodx>

public plugin_precache()
    
log_amx("%i %i %i"get_user_msgid("TeamInfo"), get_user_msgid("Damage"), get_user_msgid("ScreenFade")) 
The output of this code is "0 0 0" on server start.
After I restart the server with the "restart" command or change the map, the output is "86 71 98" as it should be.

I tested both on 1.8.3 latest dev build and 1.8.2. The results are the same. It happens with any message.
However, if I change the event to plugin_init() instead of plugin_precache(), it works normally.

Am I missing something or is this a bug?
__________________

Last edited by OciXCrom; 06-26-2018 at 15:11.
OciXCrom is offline
Send a message via Skype™ to OciXCrom