AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Won't precache model 0_o (https://forums.alliedmods.net/showthread.php?t=108707)

xbatista 11-08-2009 10:51

Won't precache model 0_o
 
God damn it why it won't precache the last( "fleshpound" ) model in ZOMBIE_CLASSES
PHP Code:

new const ZOMBIE_CLASSES[][]= {
    
"patriv"
    
"classic"
    
"scrake",
    
"siren",
    
"fleshpound"


PHP Code:

// Precache
    
new modelpath_human[100];
    for(new 
0sizeof ZOMBIE_CLASSESi++)
    {
        
formatex(modelpath_humansizeof modelpath_human 1"models/player/%s/%s.mdl"ZOMBIE_CLASSES[i], ZOMBIE_CLASSES[i])
        if( !
file_existsmodelpath_human ) )
        {
            return 
0;
        }

        
engfunc(EngFunc_PrecacheModelmodelpath_human)

        
formatex(modelpath_humansizeof modelpath_human 1"models/player/%s/%sT.mdl"ZOMBIE_CLASSES[i], ZOMBIE_CLASSES[i])
        if ( 
file_existsmodelpath_human ) )
        {
            
engfunc(EngFunc_PrecacheModelmodelpath_human);

            return 
1;
        }
    } 

FUCK what the hell, no really? Stupid bugs
I will suicide

Arkshine 11-08-2009 10:52

Re: Won't precache model 0_o
 
I see nothing wrong. If it doesn't precache it means the model name is absent or badly named.

xbatista 11-08-2009 11:01

Re: Won't precache model 0_o
 
No no it's correct named :/
I've tryied :
PHP Code:

engfunc(EngFunc_PrecacheModel"models/player/fleshpound/fleshpound.mdl"); 

and works.. But I don't want it

I checked 1000 times is it correctly named and model is good

Arkshine 11-08-2009 11:06

Re: Won't precache model 0_o
 
Debug the code. Add a log_amx() or server_print() in each condition and see.

xbatista 11-08-2009 11:51

Re: Won't precache model 0_o
 
I got only 3 from 5 !! oh fuck
Quote:

L 11/08/2009 - 18:50:09: [zombie.amxx] models/player/patriv/patriv.mdl
L 11/08/2009 - 18:50:09: [zombie.amxx] models/player/classic/classic.mdl
L 11/08/2009 - 18:50:09: [zombie.amxx] models/player/scrake/scrake.mdl
Names are correct, whats wrong?

Arkshine 11-08-2009 12:10

Re: Won't precache model 0_o
 
You have added the debug where ? Are you sure that you're running the plugin with ZOMBIE_CLASSES modified ?


All times are GMT -4. The time now is 17:42.

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