Raised This Month: $32 Target: $400
 8% 

Solved precaching textures not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 03-20-2017 , 12:41   precaching textures not working
Reply With Quote #1

Hi Allied Modders users, i have a question about precaching textures, bouth of codes works on a CS:S server, still not sure about second but first works just fine, on Source Mod 1.7.3 but on SM 1.8.0 none of them works why ?
PHP Code:
public PrecacheSkyBoxTexture ( ) 
{
    
/****************************************************************************************************************/
    
    
decl String:newskybox 32 ];
    
GetConVarString cvarSkyboxnewskyboxsizeof newskybox ) );
        
    
decl String:skyname_download1 128 ];
    
Format skyname_download1sizeof skyname_download1 ), "materials/skybox/%sup.vtf"newskybox );
    
AddFileToDownloadsTable skyname_download1 );
    
    
decl String:skyname_dld20 128 ];
    
Format skyname_dld20sizeof skyname_dld20 ), "materials/skybox/%sdn.vtf"newskybox );
    
AddFileToDownloadsTable skyname_dld20 );
    
    
decl String:skyname_dld21 128 ];
    
Format skyname_dld21sizeof skyname_dld21 ), "materials/skybox/%sft.vtf"newskybox );
    
AddFileToDownloadsTable skyname_dld21 );
    
    
decl String:skyname_dld22 128 ];
    
Format skyname_dld22sizeof skyname_dld22 ), "materials/skybox/%slf.vtf"newskybox );
    
AddFileToDownloadsTable skyname_dld22 );
    
    
decl String:skyname_dld23 128 ];
    
Format skyname_dld23sizeof skyname_dld23 ), "materials/skybox/%srt.vtf"newskybox );
    
AddFileToDownloadsTable skyname_dld23 );
    
    
decl String:skyname_dld24 128 ];
    
Format skyname_dld24sizeof skyname_dld24 ), "materials/skybox/%sbk.vtf"newskybox );
    
AddFileToDownloadsTable skyname_dld24 );
    
    
/******************************End of VTF Texture*****************************************************************/
    
    
decl String:skyname_download3 128 ];
    
Format skyname_download3sizeof skyname_download3 ), "materials/skybox/%sup.vmt"newskybox );
    
AddFileToDownloadsTable skyname_download3 );
    
    
decl String:skyname_dld30 128 ];
    
Format skyname_dld30sizeof skyname_dld30 ), "materials/skybox/%sdn.vmt"newskybox );
    
AddFileToDownloadsTable skyname_dld30 );
    
    
decl String:skyname_dld31 128 ];
    
Format skyname_dld31sizeof skyname_dld31 ), "materials/skybox/%sft.vmt"newskybox );
    
AddFileToDownloadsTable skyname_dld31 );
    
    
decl String:skyname_dld32 128 ];
    
Format skyname_dld32sizeof skyname_dld32 ), "materials/skybox/%slf.vmt"newskybox );
    
AddFileToDownloadsTable skyname_dld32 );
    
    
decl String:skyname_dld33 128 ];
    
Format skyname_dld33sizeof skyname_dld33 ), "materials/skybox/%srt.vmt"newskybox );
    
AddFileToDownloadsTable skyname_dld33 );
    
    
decl String:skyname_dld34 128 ];
    
Format skyname_dld34sizeof skyname_dld34 ), "materials/skybox/%sbk.vmt"newskybox );
    
AddFileToDownloadsTable skyname_dld34 );
        
    
/****************************End of VMT Textures******************************************************************/

and second , not sure if it is working at all
PHP Code:
void PrecacheSkyBoxTexture ( ) 
{
    static 
char suffix [ ] [ ] =
    {
        
"bk",
        
"Bk",
        
"dn",
        
"Dn",
        
"ft",
        
"Ft",
        
"lf",
        
"Lf",
        
"rt",
        
"Rt",
        
"up",
        
"Up",
    };
    
    
decl String:newskybox 32 ];
    
GetConVarString cvarSkyboxnewskyboxsizeof newskybox ) );
    
char buffer64];
    
    for ( 
int i 0sizeof suffix ); i++ )
    {
        
FormatEx buffersizeof buffer ), "materials/skybox/%s%s.vtf"newskyboxsuffix ] );
        if ( 
FileExists bufferfalse ) )
            
AddFileToDownloadsTable buffer );
                
        
FormatEx buffersizeof buffer ), "materials/skybox/%s%s.vmt"newskyboxsuffix ] );
        if ( 
FileExists bufferfalse ) )
            
AddFileToDownloadsTable buffer );
    }

Any help ?
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 03-20-2017 at 13:39. Reason: solved, it was from my client.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
Reply


Thread Tools
Display Modes

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 07:03.


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