precache files
First of all, excuse my bad english :oops:
I need a method for 'precache' files from my server. i.e: When any player join in my server, automatically download generic files (like models, sounds...) in the directory I specify. I only found a solution in the .res files (in cstrike/maps folder). This method works fine, but I need to make a .res file for each map (i.e: map1.res, map2.res...). It's so hard when I need to add or delete a file. My question is... exists any generic method for all de_, cs_, etc. maps? (like prefix_de.res or de_prefix.res)... I already tried that with this examples, but does not work. Or better, is possible to do a .res for all maps types?? Also, I tried to use "prefix_de.cfg" (for all de_ maps) in addons/amxmod/configs/maps folder, but this is only for commands (like cvars). If exist any method for do this (using .cfg / .ini), I prefer this solution, because this files are always needed, map type does not matter. If it's possible, I want to do this without plugins. Please, help me! need backup! Thanks! |
Re: precache files
All maps are not the same and dont have the same resources. It's normal to have one res by map. I don't understand your problem.
|
Re: precache files
Quote:
My problem is... I have models with 2 files, the first is the model and the other is the texture. i.e: zombie.mdl, zombieT.mdl. But in my mod, I only can call to one model in the "mod.ini" config, but I need download the "texture model" file, in the same directory, for view that model. I try to import textures (with Jedi model viewer), but does not work. My solution: write the line "models/player/zombieT" in all .res files. If you know another solution, please tell me. Thanks for answering. Thank you very much. ;) P.S: Sorry for my english, I promise to study more. :P |
Re: precache files
Your problem is related to your plugin, so you have to modify your plugin. What I would do is when you get the model name while reading the file, I would check if the same model name with T exists, if so I precache it.
|
Re: precache files
Thank you Arkshine, I will try that.
I dont know how to do that, but I will investigate. + karma 4 you !!! :) |
Re: precache files
Not that hard. After you get the model name, format the name adding "T" ( format[ex](), add() ), check if the file exists ( file_exists() ; remember you need the full path ), if so, precache it. ( precache_sound() for wav, precache_generic() for mp3 )
|
Re: precache files
I found this plugin that solves this problem.
http://forums.alliedmods.net/showthr...light=precache "This plugin precaches the texture models (*t.mdl) of any models precached by the server" Look a part of code: Code:
// Determine the associated *t.mdl file and check if it existsThanks again :wink: |
| All times are GMT -4. The time now is 22:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.