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

Solved SVC_STOPSOUND message


Post New Thread Reply   
 
Thread Tools Display Modes
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 11-28-2022 , 14:19   Re: SVC_STOPSOUND message
Reply With Quote #11

Quote:
Originally Posted by damage220 View Post
As far as I know you cannot use this command on client connect. It works only after spawn and have to be issued every round. Okay, I understand your point. It is not that important. I usually try to improve things if I can.
client_connect: If someone is connecting to the server.
client_putinserver: If someone see the motd of server. He's already joined.


use client_putinserver...
MrPickles is offline
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 11-28-2022 , 15:05   Re: SVC_STOPSOUND message
Reply With Quote #12

you can either remove all ambient_generic entities on map start...
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 11-28-2022 at 15:09.
kww is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 11-28-2022 , 16:51   Re: SVC_STOPSOUND message
Reply With Quote #13

PHP Code:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
// Add your code here...
}

public 
plugin_precache( ) {
        
RegisterHamHam_Spawn"ambient_generic""SpawnSauce" );
}

public 
SpawnSauceent ) {
        
set_peventpev_message);
        return 
HAM_HANDLED;

__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 11-29-2022 , 07:36   Re: SVC_STOPSOUND message
Reply With Quote #14

what is pev_message?
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951
kww is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-29-2022 , 08:11   Re: SVC_STOPSOUND message
Reply With Quote #15

That's the filepath to the sound. Look at a BSP to see examples.
__________________
DJEarthQuake is offline
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 11-29-2022 , 11:20   Re: SVC_STOPSOUND message
Reply With Quote #16

Quote:
Originally Posted by MrPickles View Post
client_connect: If someone is connecting to the server.
client_putinserver: If someone see the motd of server. He's already joined.


use client_putinserver...
Have you tested? I can confirm that it does not work, the sound is still there. Correct me if I did something wrong.
PHP Code:
public client_putinserver(pid)
{
    
client_cmd(pid"stopsound");

damage220 is offline
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 11-29-2022 , 11:21   Re: SVC_STOPSOUND message
Reply With Quote #17

Quote:
Originally Posted by DruGzOG View Post
PHP Code:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
// Add your code here...
}

public 
plugin_precache( ) {
        
RegisterHamHam_Spawn"ambient_generic""SpawnSauce" );
}

public 
SpawnSauceent ) {
        
set_peventpev_message);
        return 
HAM_HANDLED;

Works like a charm, thank you. Thanks to all. Closed.
damage220 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 05:53.


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