Raised This Month: $ Target: $400
 0% 

Precache called after FM registered forwards?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-28-2005 , 19:46   Precache called after FM registered forwards?
Reply With Quote #1

Ok, I've been trying to BLOCK some of the precaching and setmodel commands, but I've been having a strange problem. In TS, when I simply tell the plugin to tell me whenever things are precached, instead of a huge list of precached things at the beginning and nothing after, it tells me it continues precaching powerup.mdl over and over. And nothing else.

Code:
#include <amxmodx> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("Precache Info","1.17","Melanie")     register_forward(FM_PrecacheModel,"model_handle",0); } public plugin_modules(){     require_module("Engine");     require_module("FakeMeta"); } public model_handle(str[]){     server_print("Model %s precached",str);     return FMRES_SUPERCEDE }


I tried to register it sooner, in plugin_modules, but even though it didnt crash, it gave me the same thing. Any idea on how I could capture the precache signals before its actually precached?
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-28-2005 , 20:09  
Reply With Quote #2

Ok I figured it out. Heres what I did:
Code:
#include <amxmodx> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("Unprecacher","1.17","Melanie") } public plugin_precache() register_forward(FM_PrecacheModel,"model_handle"); public plugin_modules(){     require_module("Engine");     require_module("FakeMeta"); } public model_handle(str[]){     server_print("Model %s precached",str);     return FMRES_OVERRIDE }

I registered the forward ON the precache function. Now, this confuses me, because:
Quote:
plugin_precache - Called after plugin_cfg
And also:
Quote:
plugin_cfg - Called after plugin_init has been called
Ok, so precache is called after cfg, and cfgg is called after init, and yet the evidence points towards init being called AFTER precache, thus AFTER cfg.

Pretty strange, in my opinion.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 14:09.


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