AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to block a sound of a shot? (https://forums.alliedmods.net/showthread.php?t=95648)

CLLlAgOB 06-25-2009 16:59

How to block a sound of a shot?
 
How to block a sound of a shot for associates?

This way blocks a shot sound only for the shoot player:

Code:

#include <amxmodx>       
#include <fakemeta>       

public        plugin_init()       
{       
        register_plugin("test",        "0.1",        "tester")       
        register_forward(FM_UpdateClientData, "fw_updateclientdata",1);       
}       


public fw_updateclientdata(id, sw, cd_handle)
{
        //this function overrides the client side sounds and stuff
        if (cd_handle)
        {

                set_cd(cd_handle, CD_ID, 1);
                //get_cd(cd_handle, CD_flNextAttack, nextattack[id]);
               
                return FMRES_HANDLED;

        }
        return FMRES_IGNORED;
}


Arkshine 06-25-2009 19:51

Re: How to block a sound of a shot?
 
You can't block weapon sound except knife, since it's client-side. But you can fully block an attack.


All times are GMT -4. The time now is 15:41.

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