Raised This Month: $ Target: $400
 0% 

How to successfully precache files


Post New Thread Reply   
 
Thread Tools Display Modes
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 08-29-2010 , 13:25   Re: How to successfully precache files
Reply With Quote #11

Hey,GLX..you should add how to precache sprites too
__________________
albert123 is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-29-2010 , 13:35   Re: How to successfully precache files
Reply With Quote #12

and dont forget about precache_generic( ), too...
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-29-2010 , 13:49   Re: How to successfully precache files
Reply With Quote #13

Though this is not necessarily part of the precache process, it can be helpful for those that need to precache a list of items.

PHP Code:
new const g_Models[][] = 
{
    
"models/model1.mdl",
    
"models/model2.mdl",
    
"models/model3.mdl"
}    

public 
plugin_precache()
{
    for ( new 
sizeofg_Models ) ; i++ )
        
precache_modelg_Models] );

__________________
Bugsy is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 08-29-2010 , 13:57   Re: How to successfully precache files
Reply With Quote #14

Quote:
Originally Posted by Bugsy View Post
Though this is not necessarily part of the precache process, it can be helpful for those that need to precache a list of items.

PHP Code:
new const g_Models[][] = 
{
    
"models/model1.mdl",
    
"models/model2.mdl",
    
"models/model3.mdl"
}    

public 
plugin_precache()
{
    for ( new 
sizeofg_Models ) ; i++ )
        
precache_modelg_Models] );

Added, thanks
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 08-29-2010 , 13:58   Re: How to successfully precache files
Reply With Quote #15

Quote:
Originally Posted by meTaLiCroSS View Post
Add one thing: Explain why isn't needed to add "sound/" on a sound path while precaching.
Let me refer you to the first post.

Quote:
Originally Posted by GXLZPGX View Post
And no, I don't know why you have to specify the models folder when creating a constant for a model, and you don't for sound.
------------------------------

Quote:
Originally Posted by meTaLiCroSS View Post
Add one thing: Explain why isn't needed to add "sound/" on a sound path while precaching.
Let me refer you to the first post.

Quote:
Originally Posted by GXLZPGX View Post
And no, I don't know why you have to specify the models folder when creating a constant for a model, and you don't for sound.
------------------------------

Quote:
Originally Posted by albert123 View Post
Hey,GLX..you should add how to precache sprites too
Added, it's under the first Models text in bold.

------------------------------

Quote:
Originally Posted by NiHiLaNTh View Post
and dont forget about precache_generic( ), too...
Added.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.

Last edited by GXLZPGX; 08-29-2010 at 14:10.
GXLZPGX is offline
Old 08-29-2010, 14:07
GXLZPGX
This message has been deleted by GXLZPGX. Reason: Multiple Posts
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-29-2010 , 14:42   Re: How to successfully precache files
Reply With Quote #16

Add a notice that with precache_sound you can precache only .wav files.To precache mp3 files use precache_generic( )
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-29-2010 , 14:44   Re: How to successfully precache files
Reply With Quote #17

Quote:
Originally Posted by GXLZPGX View Post
Quote:
Originally Posted by meTaLiCroSS View Post
Add one thing: Explain why isn't needed to add "sound/" on a sound path while precaching.
Let me refer you to the first post.

Quote:
Originally Posted by GXLZPGX View Post
And no, I don't know why you have to specify the models folder when creating a constant for a model, and you don't for sound.
Seeing as the SDK also doesn't include the sound folder, the only logical conclusion is that it assumes the sounds folder when using PRECACHE_SOUND
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 08-29-2010 , 15:11   Re: How to successfully precache files
Reply With Quote #18

There isn't another (better) way to set a player model ?
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-29-2010 , 15:13   Re: How to successfully precache files
Reply With Quote #19

Devil259, learn to search before posting... Already so much asked. Anyway, see the connor's plugins, he uses the right method.
__________________
Arkshine is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 08-29-2010 , 15:18   Re: How to successfully precache files
Reply With Quote #20

Ok ok sorry, I will see PlayerModels.
__________________
You can do anything you set your mind to, man.

Devil259 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 12:21.


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