Hi. I seem to be having a ton of problems with HL modding/mapping, lol.
Anyway, I tried making a new weapon (really a modified copy+paste of MP5.cpp) and I'm 99.99999% sure I got everything right because when I compiled the dlls I didn't get any errors.
But, when I go into the game (usually I go to the map "c2a5" [the "surface tension" chapter]) and try to use the console command "give weapon_m4", I get booted out of the game and the error 'Host_Error: PF_Precache_Model_L "models/v_m4.mdl" Precache can only be done in spawn functions!' comes up in the console.
What does "Precache can only be done in spawn functions!" mean? I extracted the models to my default HL models folder (after making backup dll files).
The models 'v_m4.mdl' , 'p_m4.mdl' , and 'w_m4.mdl' are in my HL's models folder (E:/SIERRA/Half-Life/valve/models) and it still gives me this error.
What's up? Is it because the weapon isn't loaded in the default maps, kind of like trying to spawn a monster that isn't loaded in the map?