Raised This Month: $ Target: $400
 0% 

[Solved]Spk/Speak Volume-Undesired Outcome Ingame


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 02-12-2013 , 09:49   Re: Volume for spk does not take effect ingame.
Reply With Quote #6

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.
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
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
 



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 20:36.


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