Raised This Month: $ Target: $400
 0% 

[HELP] Stop echo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Akshat
Senior Member
Join Date: Feb 2013
Location: India, Jaipur.
Old 01-30-2015 , 13:57   [HELP] Stop echo
Reply With Quote #1

Why is echo not getting stopped? I made this :
PHP Code:
public stop_echo()
{
    
set_task(0.1,"stop_echo")
    
client_cmd(0"room_type 00")
    new Echo = 
find_ent_by_class(0,"env_sound")
    while(Echo)
    {
        
remove_entity(Echo)
        Echo = 
find_ent_by_class(Echo,"env_sound")
        
    }

__________________
Learning Pawn [3% Complete!]

Last edited by Akshat; 01-30-2015 at 14:08.
Akshat is offline
Send a message via Skype™ to Akshat
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 01-30-2015 , 16:26   Re: [HELP] Stop echo
Reply With Quote #2

probably room_type command has been blocked. You can try sending SVC_ROOMTYPE message.

message_begin( MSG_ONE, SVC_ROOMTYPE, .player = id );
write_short( 0 );
message_end( );

And besides shouldn't it be like "room_type 0" not "room_type 00" ?
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 01-30-2015 , 17:48   Re: [HELP] Stop echo
Reply With Quote #3

It's much better to block the creation of these entities.
If you want to do so, there it is.

PHP Code:
#include <amxmodx>
#include <fakemeta>

new gp_Fwdid

public plugin_precache()
{
    
gp_Fwdid register_forward(FM_Spawn"FM_Spawn_Pre")
}

public 
plugin_init()
{
    
register_plugin("Remove Echo""1.0.0""Arkshine")
    
unregister_forward(FM_Spawngp_Fwdid)
}

public 
FM_Spawn_Pre(i_Ent)
{
    new 
s_Classname[7]
    
pev(i_Entpev_classnames_Classnamecharsmax(s_Classname))

    if ( 
s_Classname[4] != 's' ) return FMRES_IGNORED

    
if ( s_Classname[5] == 'o' ) return FMRES_SUPERCEDE    // -- "env_sound"

    
return FMRES_IGNORED


Last edited by Fr33m@n; 01-30-2015 at 18:05.
Fr33m@n is offline
Akshat
Senior Member
Join Date: Feb 2013
Location: India, Jaipur.
Old 01-31-2015 , 09:25   Re: [HELP] Stop echo
Reply With Quote #4

Quote:
Originally Posted by NiHiLaNTh View Post
probably room_type command has been blocked. You can try sending SVC_ROOMTYPE message.

message_begin( MSG_ONE, SVC_ROOMTYPE, .player = id );
write_short( 0 );
message_end( );

And besides shouldn't it be like "room_type 0" not "room_type 00" ?
Probably its "00" as I saw it in a echo fix plugin.
__________________
Learning Pawn [3% Complete!]
Akshat is offline
Send a message via Skype™ to Akshat
Akshat
Senior Member
Join Date: Feb 2013
Location: India, Jaipur.
Old 01-31-2015 , 09:28   Re: [HELP] Stop echo
Reply With Quote #5

Quote:
Originally Posted by Fr33m@n View Post
It's much better to block the creation of these entities.
If you want to do so, there it is.

PHP Code:
#include <amxmodx>
#include <fakemeta>

new gp_Fwdid

public plugin_precache()
{
    
gp_Fwdid register_forward(FM_Spawn"FM_Spawn_Pre")
}

public 
plugin_init()
{
    
register_plugin("Remove Echo""1.0.0""Arkshine")
    
unregister_forward(FM_Spawngp_Fwdid)
}

public 
FM_Spawn_Pre(i_Ent)
{
    new 
s_Classname[7]
    
pev(i_Entpev_classnames_Classnamecharsmax(s_Classname))

    if ( 
s_Classname[4] != 's' ) return FMRES_IGNORED

    
if ( s_Classname[5] == 'o' ) return FMRES_SUPERCEDE    // -- "env_sound"

    
return FMRES_IGNORED

Thank you very much
__________________
Learning Pawn [3% Complete!]
Akshat is offline
Send a message via Skype™ to Akshat
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 18:04.


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