AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Precache sound problem (https://forums.alliedmods.net/showthread.php?t=209891)

razermamba 03-03-2013 10:27

Precache sound problem
 
Hi, I have this code with precaching sound and when I run server it falls down and show: Mod_NumForName: Left4Dead/Hunter_die1.wav
but i put all the files on the right place in sound files.
Whats the problem? Models work fine.

PHP Code:

new const ZOMBIE_MODEL[][] = {"hunter""smoker"};
new const 
PLAYERMODEL_CLASSNAME[] = "ent_playermodel";
new const 
WEAPONMODEL_CLASSNAME[] = "ent_weaponmodel";
new const 
g_ZombieClaws[] = {"models/v_hunter_knife.mdl"};

new const 
g_sound_zombiewin[] = "umbrella/zombiewin.wav";
new const 
g_sound_humanwin[] = "umbrella/humanwin.wav";

new const 
g_sound_miss[][]=
{
    
"Left4Dead/Hunter_miss1.wav",
    
"Left4Dead/Hunter_miss2.wav",
    
"Left4Dead/Hunter_miss3.wav"
};

new const 
g_sound_hit[][]=
{
    
"Left4Dead/Hunter_strike1.wav",
    
"Left4Dead/Hunter_strike2.wav",
    
"Left4Dead/Hunter_strike3.wav"
};

new const 
g_sound_pain[][]=
{
    
"Left4Dead/Hunter_pain1.wav",
    
"Left4Dead/Hunter_pain2.wav",
    
"Left4Dead/Hunter_pain3.wav"
};

new const 
g_sound_die[][]=
{
    
"Left4Dead/Hunter_die1.wav",
    
"Left4Dead/Hunter_die2.wav"
};

new 
g_player_model[33][32];
new 
g_ent_playermodel[33];
new 
g_ent_weaponmodel[33];
new 
boolg_Zombie[33];


new 
cvar_healthcvar_armorcvar_gravitycvar_speedcvar_respawncvar_switchcvar_semiclip,
cvar_semiclip_tcvar_semiclip_ct;

public 
plugin_precache()
{
    for(new 
=0sizeof ZOMBIE_MODELi++)
    {
        new 
modelpath[256];
        
formatexmodelpath255"models/player/%s/%s.mdl"ZOMBIE_MODEL[i], ZOMBIE_MODEL[i] );
        
precache_model(modelpath);
    }
    
    new 
i;
    for(
0sizeof g_sound_diei++)
        
engfunc(EngFunc_PrecacheModelg_sound_die[i]);
    for(
0sizeof g_sound_hiti++)
        
engfunc(EngFunc_PrecacheModelg_sound_hit[i]);    
    for(
0sizeof g_sound_missi++)
        
engfunc(EngFunc_PrecacheModelg_sound_miss[i]);    
    for(
0sizeof g_sound_paini++)
        
engfunc(EngFunc_PrecacheModelg_sound_pain[i]);        
    
    
    
precache_model(g_ZombieClaws);
    
    
precache_sound(g_sound_zombiewin);
    
precache_sound(g_sound_humanwin);



Arkshine 03-03-2013 10:47

Re: Precache sound problem
 
engfunc(EngFunc_PrecacheModel, g_sound_die[i])

You see nothing wrong ?

razermamba 03-03-2013 10:53

Re: Precache sound problem
 
oh thx. i should sleep more. :D


All times are GMT -4. The time now is 21:38.

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