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

Radio sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-13-2012 , 12:40   Radio sounds
Reply With Quote #1

Are default CS radio sounds precached and if they are, can they be unprecached?
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-13-2012 , 13:24   Re: Radio sounds
Reply With Quote #2

Yes, they are precached otherwise you would not be able to hear them, because if a sound played with EmitSound and not precached, the server will crash. And yes, if you block the menu/command and hook some forward (try FM_PrecacheSound), you can block the precache, but be aware if a plugin emits the sound and the sound is not precached, you server will die.
__________________
Arkshine is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-13-2012 , 13:28   Re: Radio sounds
Reply With Quote #3

I know it will crash, I just wanted to know if they are precached and if I am able to unprecache them.

AFAIK sounds don't have to be precached if you're going to execute 'spk' command on the client. But that probably applies only to plugins. Thank you, that's some nice space under the precache limit for me.
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 06-13-2012 , 15:44   Re: Radio sounds
Reply With Quote #4

I thought unprecached sounds would not crash, but would give more like an error message in the console, or is that false?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-13-2012 , 15:45   Re: Radio sounds
Reply With Quote #5

false
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-13-2012 , 16:08   Re: Radio sounds
Reply With Quote #6

Quote:
Originally Posted by bibu View Post
I thought unprecached sounds would not crash, but would give more like an error message in the console, or is that false?
If using with "spk" command, an error will be in player's console saying it doesn't exist.
It won't crash the server since the command is client-side only.

If using with emit_sound(), then it will crash the server if it is not precached.
This is because the sound is played server-side.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-09-2014 , 09:55   Re: Radio sounds
Reply With Quote #7

Did you ever succeed to unpreacache them? I'm trying but no success.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 07-09-2014 , 16:46   Re: Radio sounds
Reply With Quote #8

PHP Code:
// Sound Precache Forward
public fw_PrecacheSound(const sound[])
{
 
// Block all those unneeeded hostage sounds
 
if (equal(sound"hostage"7))
  return 
FMRES_SUPERCEDE;
 
 return 
FMRES_IGNORED;

Code by MeRcyLeZZ.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-09-2014 , 16:55   Re: Radio sounds
Reply With Quote #9

I tried this code: https://forums.alliedmods.net/showthread.php?t=209421
But when I debug in precache radio commands, there are only some of the sound, none of them from radio1-4 commands.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
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 02:47.


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