View Single Post
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-30-2018 , 14:27   Re: get_user_msgid() fails to work on server startup?
Reply With Quote #7

Not really a bug I believe. It's just that the game registers such messages in pfnServerActivate.

plugin_precache() is called before, at the first word pfnSpawn. So you can't use get_user_msgid() at this point at the first server start because not cached yet.
plugin_init() is called after in pfnServerActivate as post. It's too late to hook for WeaponList.

One possible solution is to hook FM_RegUserMsg, and hooking WeaponList once the message is registered (In CS, the WeaponList messages are fired right after the message is registered).

Probably not fixable unless we implement a dedicated forward which would be fired once all the messages are registered.
__________________

Last edited by Arkshine; 07-30-2018 at 14:38.
Arkshine is offline