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

EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-19)


Post New Thread Reply   
 
Thread Tools Display Modes
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 06-14-2021 , 20:17   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #81

Quote:
Originally Posted by paulo_crash View Post
Could someone help me, I'm trying to use the following native for the spray sounds:
PHP Code:
stock EmitSoundToClientAny(client,
                 const 
String:sample[],
                 
entity SOUND_FROM_PLAYER,
                 
channel SNDCHAN_AUTO,
                 
level SNDLEVEL_NORMAL,
                 
flags SND_NOFLAGS,
                 
Float:volume SNDVOL_NORMAL,
                 
pitch SNDPITCH_NORMAL,
                 
speakerentity = -1,
                 const 
Float:origin[3] = NULL_VECTOR,
                 const 
Float:dir[3] = NULL_VECTOR,
                 
bool:updatePos true,
                 
Float:soundtime 0.0)
{
    new 
clients[1];
    
clients[0] = client;
    
/* Save some work for SDKTools and remove SOUND_FROM_PLAYER references */
    
entity = (entity == SOUND_FROM_PLAYER) ? client entity;
    
EmitSoundAny(clients1sampleentitychannel
    
levelflagsvolumepitchspeakerentity,
    
origindirupdatePossoundtime);

In case I wanted only the player, when using the spray on the server, to hear the audio of the spray being applied, other players wouldn't hear anything.

I tried as follows:
PHP Code:
EmitSoundToClientAny(SOUND_SPRAY_RELiClientSNDCHAN_AUTOSNDLEVEL_NORMALSND_NOFLAGS0.4); 
Porém da este erro na hora de compilar:
PHP Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// franug_valvesprays.sp
//
// D:\Google Drive\ZK ServidoresÖ\Servidores CSGO\Editar Plugins\addons\sourcemod\scripting\valvesprays.sp(48) : warning 241: Array-based enum structs will be removed in 1.11. See [url]https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Enum_Structs[/url]
// D:\Google Drive\ZK ServidoresÖ\Servidores CSGO\Editar Plugins\addons\sourcemod\scripting\valvesprays.sp(52) : warning 241: Array-based enum structs will be removed in 1.11. See [url]https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Enum_Structs[/url]
// D:\Google Drive\ZK ServidoresÖ\Servidores CSGO\Editar Plugins\addons\sourcemod\scripting\valvesprays.sp(177) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
//
//
// D:\Google Drive\ZK ServidoresÖ\Servidores CSGO\Editar Plugins\addons\sourcemod\scripting\valvesprays.sp(287) : error 035: argument type mismatch (argument 1)
// D:\Google Drive\ZK ServidoresÖ\Servidores CSGO\Editar Plugins\addons\sourcemod\scripting\valvesprays.sp(362) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
//
//
//
// 1 Error.
//
// Compilation Time: 0,7 sec
// ----------------------------------------

Press enter to exit ... 
How can I fix it, or is it even another native I should use?
don't think csgo needs to use this anymore

to fix your compile error try

Code:
EmitSoundToClientAny(iClient, SOUND_SPRAY_REL, iClient, SNDCHAN_AUTO, SNDLEVEL_NORMAL, SND_NOFLAGS, 0.4);
__________________
8guawong is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 06-15-2021 , 01:28   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #82

Quote:
Originally Posted by 8guawong View Post
don't think csgo needs to use this anymore

to fix your compile error try

Code:
EmitSoundToClientAny(iClient, SOUND_SPRAY_REL, iClient, SNDCHAN_AUTO, SNDLEVEL_NORMAL, SND_NOFLAGS, 0.4);
Compiled, but now neither I nor the players hear the spray sound.

Apparently gives a precache error:
PHP Code:
EmitAmbientSound:  sound not precached: **/player/spray_zk.mp3

EmitAmbientSound
:  sound not precached: **/player/spray_zk.mp3

EmitAmbientSound
:  sound not precached: **/player/spray_zk.mp3 

Last edited by paulo_crash; 06-15-2021 at 01:32.
paulo_crash is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 06-16-2021 , 11:53   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #83

Quote:
Originally Posted by paulo_crash View Post
Compiled, but now neither I nor the players hear the spray sound.

Apparently gives a precache error:
PHP Code:
EmitAmbientSound:  sound not precached: **/player/spray_zk.mp3

EmitAmbientSound
:  sound not precached: **/player/spray_zk.mp3

EmitAmbientSound
:  sound not precached: **/player/spray_zk.mp3 
like i said above i don't think csgo needs to use this include anymore
try using the one provided by sourcemod
__________________
8guawong is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 06-17-2021 , 16:25   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #84

Quote:
Originally Posted by 8guawong View Post
like i said above i don't think csgo needs to use this include anymore
try using the one provided by sourcemod
Thanks, I will try to fix some BUGS in it first and then I see to remove the include and use the sourcemod one.

Anything I'll contact you here.

If you can help me with the BUGS I commented on, it would be in this topic: https://forums.alliedmods.net/showthread.php?t=333070 (From what I could see you know more about sourcepawn and such )

Last edited by paulo_crash; 06-17-2021 at 16:37.
paulo_crash is offline
Reply


Thread Tools
Display Modes

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 09:40.


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