Raised This Month: $51 Target: $400
 12% 

help with quake sounds plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Grrrrrrrrrrrrrrrrrrr
Senior Member
Join Date: Oct 2007
Old 06-30-2009 , 15:10   help with quake sounds plugin
Reply With Quote #1

For some reason, the sounds are not being precached. I checked the code, sv_downloadurl, and sv_pure, and I was still not able to find the problem.

Please help find out why the sounds are not precaching for the quake sounds plug-in I helped create. (link)
__________________
Note: "r" letters = 19 ; CHEESE: I LIKE CHOCOLATE MILK
Grrrrrrrrrrrrrrrrrrr is offline
Send a message via AIM to Grrrrrrrrrrrrrrrrrrr
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 06-30-2009 , 15:47   Re: help with quake sounds plugin
Reply With Quote #2

Well...If they are done in the plugin itself(should be), then it should be precaching. Perhaps you need to add them to pure whitelist? If they are not precached in whatever plugin youre using, then youd obviously need to precache them.

Turn off any sv_pure stuff and see if that fixes the issue, if it does then its sv_pure related.

Last edited by retsam; 06-30-2009 at 15:54.
retsam is offline
Grrrrrrrrrrrrrrrrrrr
Senior Member
Join Date: Oct 2007
Old 06-30-2009 , 20:02   Re: help with quake sounds plugin
Reply With Quote #3

I tried that.

Quote:
Originally Posted by Grrrrrrrrrrrrrrrrrrr
I checked the code, sv_downloadurl, and sv_pure, and I was still not able to find the problem.
__________________
Note: "r" letters = 19 ; CHEESE: I LIKE CHOCOLATE MILK
Grrrrrrrrrrrrrrrrrrr is offline
Send a message via AIM to Grrrrrrrrrrrrrrrrrrr
almcaeobtac
Senior Member
Join Date: Nov 2008
Location: Florida
Old 06-30-2009 , 23:46   Re: help with quake sounds plugin
Reply With Quote #4

PrecacheSound(String:Soundname)?
__________________
almcaeobtac is offline
Grrrrrrrrrrrrrrrrrrr
Senior Member
Join Date: Oct 2007
Old 07-01-2009 , 05:18   Re: help with quake sounds plugin
Reply With Quote #5

The following is what I have for precaching files and it is not working.

Code:
public OnMapStart()
{
    iMaxClients=GetMaxClients();
    
    decl String:downloadFile[MAX_FILE_LEN];
    for(new i=0; i < numSounds; i++)
    {
        PrecacheSound(soundsFiles[i], true);
        Format(downloadFile, MAX_FILE_LEN, "sound/%s", soundsFiles[i]);        
        AddFileToDownloadsTable(downloadFile);
    }
    
    #if defined HL2DM
        NewRoundInitialization();
    #endif
}
The entire source code is available from http://forums.alliedmods.net/attachm...4&d=1243742395.
__________________
Note: "r" letters = 19 ; CHEESE: I LIKE CHOCOLATE MILK

Last edited by Grrrrrrrrrrrrrrrrrrr; 07-01-2009 at 05:22.
Grrrrrrrrrrrrrrrrrrr is offline
Send a message via AIM to Grrrrrrrrrrrrrrrrrrr
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 07-01-2009 , 08:38   Re: help with quake sounds plugin
Reply With Quote #6

File path string is too short.
PHP Code:
#define MAX_FILE_LEN 65 
Use PLATFORM_MAX_PATH.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
Grrrrrrrrrrrrrrrrrrr
Senior Member
Join Date: Oct 2007
Old 07-01-2009 , 13:49   Re: help with quake sounds plugin
Reply With Quote #7

ok, thank you. I changed it.

However, the sound files are still not precaching.

I tried using a different plug-in to precache the sound files, but the server still didn't send me the sound files. The server sends models, decals, and so forth, but not sound files. Is sound precaching working for other plug-ins?
__________________
Note: "r" letters = 19 ; CHEESE: I LIKE CHOCOLATE MILK

Last edited by Grrrrrrrrrrrrrrrrrrr; 07-01-2009 at 15:28.
Grrrrrrrrrrrrrrrrrrr is offline
Send a message via AIM to Grrrrrrrrrrrrrrrrrrr
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 07-02-2009 , 00:20   Re: help with quake sounds plugin
Reply With Quote #8

First of all you could add some debug messages that display
what's going on step by step.

The most important one would be this:
PHP Code:
        else
        {
         
LogMessage("[DEBUG] numSounds: %i  -  soundFiles: %s"numSoundssoundsFiles[numSounds]);
         
soundsList[typeKey][settingKills][set] = numSounds;
         
numSounds++;        
        } 
To see if you LoadSounds() is working properly at all, if it doesn't,
you know why your precache doesn't work
FeuerSturm is offline
Grrrrrrrrrrrrrrrrrrr
Senior Member
Join Date: Oct 2007
Old 07-02-2009 , 03:45   Re: help with quake sounds plugin
Reply With Quote #9

I did that already and LoadSounds() is working.

I also did the below, but there was no error. PrecacheSound returned "true".
Code:
if(!PrecacheSound(soundsFiles[i], true))
{
 PrintToServer("Error: %s", downloadFile);
}
__________________
Note: "r" letters = 19 ; CHEESE: I LIKE CHOCOLATE MILK
Grrrrrrrrrrrrrrrrrrr is offline
Send a message via AIM to Grrrrrrrrrrrrrrrrrrr
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 07-02-2009 , 12:52   Re: help with quake sounds plugin
Reply With Quote #10

Try
PHP Code:
PrecacheSound(soundsFiles[i], false); 
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
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 11:07.


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