Raised This Month: $ Target: $400
 0% 

Solved [Request] Anti Spam of Use Sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Snake.
Senior Member
Join Date: Jul 2017
Old 09-26-2020 , 07:23   Re: [Request] Anti Spam of Use Sound
Reply With Quote #18

Quote:
Originally Posted by JocAnis View Post
yo Snake, can you test this?

Need only to change USE_TIME to your value which is fine for you, i find 0.3sec is good for me:

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

#define USE_TIME 0.3

new Float: g_fUseTime[ 33 ]

public plugin_init( )
{
	register_plugin( "Block Spam +Use", "1.0", "internet provider" )

	register_forward( FM_EmitSound, "block_sound" )
}
public client_putinserver( id )
{
    g_fUseTime[ id ] = 0.0
}
public block_sound( entity, channel, const sound[] ) //Alucard^ credits
{
    if( equali( sound, "common/wpn_denyselect.wav" ) && get_gametime() - g_fUseTime[ entity ] < USE_TIME )
    {
        g_fUseTime[ entity ] = get_gametime()
        return FMRES_SUPERCEDE
    }
    g_fUseTime[ entity ] = get_gametime()
    return FMRES_IGNORED
}
Thanks. <3
Snake. is offline
Send a message via Skype™ to Snake.
 


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 23:57.


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