View Single Post
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 07-30-2018 , 15:00   Re: get_user_msgid() fails to work on server startup?
Reply With Quote #8

Ye, plugin_precache is called from first spawn (from SV_LoadEntities). And usermsg registering is called from SV_ActivateServer (pfnServerActivate callback). SV_ActivateServer is called after SV_LoadEntities. As @Arkshine said the only and best way is to hook FM_RegUserMsg.

Possibly we can add register_message_lazy which would get usermsg name instead of id and retrieve msgid when the first message is sent.
__________________

Last edited by PRoSToTeM@; 07-30-2018 at 15:24.
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@