Raised This Month: $ Target: $400
 0% 

[Solved]Spk/Speak Volume-Undesired Outcome Ingame


Post New Thread Reply   
 
Thread Tools Display Modes
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 02-12-2013 , 15:36   Re: Volume for spk does not take effect ingame.
Reply With Quote #11

Quote:
Originally Posted by Backstabnoob View Post
I don't think that's correct. The first parameter is the index of an entity the sound should come from, if it's 0, the server will most likely crash or you'll get an error in the log. If you want to play it for everyone, use the client command spk or find an entity that could be used for this.
.
Index 0 is also a entity, do you know what index have all those blocks in map what does not are like func_wall, breakable... ?
.Dare Devil. is offline
tryout101
Member
Join Date: Mar 2009
Old 02-12-2013 , 15:48   Re: [Solved]Spk/Speak Volume-Undesired Outcome Ingame
Reply With Quote #12

I am now going to try the newly complied plugin in the live server and see how it plays out there. I tested it on a local server which worked the way I wanted it.

So all clients entering the server to find it raining will hear the rain sound at far lower volume rate than normal which annoyed them.

I will post back results in a few minutes soon.
tryout101 is offline
tryout101
Member
Join Date: Mar 2009
Old 02-12-2013 , 20:41   Re: [Solved]Spk/Speak Volume-Undesired Outcome Ingame
Reply With Quote #13

Yeah works fine in the live server as well. The sound plays fine through both speakers and emits at a specified volume parameter.

I am happy. ^_^
tryout101 is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 02-13-2013 , 07:40   Re: Volume for spk does not take effect ingame.
Reply With Quote #14

Quote:
Originally Posted by meTaLiCroSS View Post
Code:
static cell AMX_NATIVE_CALL emit_sound(AMX *amx, cell *params) /* 7 param */ {     int len;     char* szSample = get_amxstring(amx, params[3], 0, len);     REAL vol = amx_ctof(params[4]);     REAL att = amx_ctof(params[5]);     int channel = params[2];     int pitch = params[7];     int flags = params[6];     if (params[1] == 0)     {         for (int i = 1; i <= gpGlobals->maxClients ; ++i)         {             CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);                         if (pPlayer->ingame)                 EMIT_SOUND_DYN2(pPlayer->pEdict, channel, szSample, vol, att, flags, pitch);         }     } else {         edict_t* pEdict = INDEXENT(params[1]);                 if (!FNullEnt(pEdict))             EMIT_SOUND_DYN2(pEdict, channel, szSample, vol, att, flags, pitch);     }     return 1; }

Nice one buddy
I said I don't think that's correct, no need to be an asshole over a mistake.
Backstabnoob is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 02-13-2013 , 12:17   Re: Volume for spk does not take effect ingame.
Reply With Quote #15

Quote:
Originally Posted by Backstabnoob View Post
no need to be an asshole over a mistake.
Being an asshole? If you say...
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
tryout101
Member
Join Date: Mar 2009
Old 02-13-2013 , 14:23   Re: [Solved]Spk/Speak Volume-Undesired Outcome Ingame
Reply With Quote #16

It's ok guys, lets not stress ourselves over nothing. But you did help alot @metalic by posting that native cell block. I know now its for players definitely. ^_^

Last edited by tryout101; 02-13-2013 at 14:23.
tryout101 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 06:15.


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