This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

precaching files


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rav3n!
Junior Member
Join Date: May 2007
Location: UK
Old 07-05-2007 , 09:55   precaching files
Reply With Quote #1

simple one really, how do you precache files on map load so that the files don't have to be called on the fly.

and also who can you make it so that the plugin calls a folder with some text files that have the laist of files to be called.

to put in context i am working on an admin model plugin, and it would be nice to have text files with admin models of choice

so for example you would have like in mani's admin models module were there was set files for each admin or public model, with text files containing the files to precache.

thanks to any answers much appreciated
Rav3n! is offline
Wiebbe
Junior Member
Join Date: Jul 2007
Old 07-05-2007 , 11:22   Re: precaching files
Reply With Quote #2

This is how its done in the RPGx mod:

precache_laser=PrecacheModel("materials/sprites/laserbeam.vmt");
Wiebbe is offline
Hell Phoenix
Senior Member
Join Date: Jan 2005
Old 07-05-2007 , 13:03   Re: precaching files
Reply With Quote #3

Just a note that precacheing a file doesnt add it to the download table. Currently you have to do that through either the download table extension or the hacks extension until its added to SM.
__________________
Hell Phoenix is offline
Rav3n!
Junior Member
Join Date: May 2007
Location: UK
Old 07-05-2007 , 16:47   Re: precaching files
Reply With Quote #4

Quote:
Originally Posted by Hell Phoenix View Post
Just a note that precacheing a file doesnt add it to the download table. Currently you have to do that through either the download table extension or the hacks extension until its added to SM.
yeh i understand that sm has no current d/load extension and was going to use download table.

cheers Wiebbe but would it be possible to say how you have used it, i not understand the
Code:
 precache_laser
section, can it be changed to precache_material, and precache_model, or is there a bit of documentation for it, i am off to the wiki to look but just incase i not find anything, thanks


EDIT:

don't worry i found it it was a simple
Code:
     PrecacheModel("modeldirectory")
__________________

Last edited by Rav3n!; 07-05-2007 at 18:41.
Rav3n! is offline
sumguy14
Senior Member
Join Date: Apr 2006
Old 07-05-2007 , 19:02   Re: precaching files
Reply With Quote #5

Yeah precache_laser is just a variable name to store the precached file index. You can change that to whatever you want.
sumguy14 is offline
Rav3n!
Junior Member
Join Date: May 2007
Location: UK
Old 07-06-2007 , 07:09   Re: precaching files
Reply With Quote #6

Quote:
Originally Posted by sumguy14 View Post
Yeah precache_laser is just a variable name to store the precached file index. You can change that to whatever you want.
yeh exactly what i thought thanks
__________________
Rav3n! is offline
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 04:45.


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