Raised This Month: $209 Target: $400
 52% 

Precache problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
undead52
Senior Member
Join Date: Dec 2016
Old 05-28-2019 , 14:55   Precache problem
Reply With Quote #1

it precaches g_szAwpModels but it doesnt precache other ones doesn't even throw any error.
PHP Code:
new const g_szAwpModels[][] = {
    
"Varsayilan",
    
"barret-bornbeast"
}

new const 
g_szKnifeModels[][] = {
    
"Varsayilan",
    
"shovel-bornbeast"
}

new const 
g_szM4Models[][] = {
    
"Varsayilan",
    
"m4a1-bornbeast"
}
public 
plugin_precache() {
    new 
path[128];

    
precache_model(g_AwpDefault);
    
precache_model(g_KnifeDefault);
    
precache_model(g_M4Default);

    for(new 
0<= sizeof(g_szAwpModels);i++)
    {
        if(
equal(g_szAwpModels[i],"") || equal(g_szAwpModels[i],"Varsayilan") || equal(g_szAwpModels[i],"Varsayılan"))
            continue;
        
        
formatex(pathcharsmax(path), "models/pubgarena/%s/v_%s.mdl"g_szAwpModels[i], g_szAwpModels[i]);
        
engfunc(EngFunc_PrecacheModelpath)
    }
    
    for(new 
0<= sizeof(g_szKnifeModels);i++)
    {
        if(
equal(g_szKnifeModels[i],"") || equal(g_szKnifeModels[i],"Varsayilan") || equal(g_szKnifeModels[i],"Varsayılan"))
            continue;

        
formatex(pathcharsmax(path), "models/pubgarena/%s/v_%s.mdl"g_szKnifeModels[i], g_szKnifeModels[i]);
        
engfunc(EngFunc_PrecacheModelpath)
    }
    
    for(new 
0<= sizeof(g_szM4Models);i++)
    {
        if(
equal(g_szM4Models[i],"") || equal(g_szM4Models[i],"Varsayilan") || equal(g_szM4Models[i],"Varsayılan"))
            continue;
        
        
formatex(pathcharsmax(path), "models/pubgarena/%s/v_%s.mdl"g_szM4Models[i], g_szM4Models[i]);
        
engfunc(EngFunc_PrecacheModelpath)
    }


Last edited by undead52; 05-28-2019 at 14:57.
undead52 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-28-2019 , 15:05   Re: Precache problem
Reply With Quote #2

i < sizeof, not <=
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
undead52
Senior Member
Join Date: Dec 2016
Old 05-28-2019 , 15:13   Re: Precache problem
Reply With Quote #3

Never noticed that, thanks
undead52 is offline
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 15:04.


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