Raised This Month: $ Target: $400
 0% 

Silent shooting - command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 01-04-2013 , 15:54   Re: Silent shooting - command
Reply With Quote #2

Try this:
PHP Code:
#pragma semicolon 0
#include <amxmisc>
#include <fakemeta>

new iEvents[] = {20,12,18,17,23,24,15,10,11,22,13,21,14,16,27,28,4,6,3,7,8,9,2,1,5}
new 
bool:g_silent[33];
public 
plugin_init() {
    
register_plugin("Blokujemy dzwieki""1.0""DarkGL")
    
register_forward(FM_PlaybackEvent"fwPlaybackEvent");
    
register_clcmd("say /silent","cmd_silent");
}

public 
fwPlaybackEventflagsideventindex,FloatdelayFloat:  origin[3], Floatangles[3], Floatfparam1Floatfparam2iparam1,  iparam2bparam1bparam2) {
    if(!
g_silent[id]) return FMRES_IGNORED;
    new 
bool:bFind false;
    
    for(new 
0;sizeof iEvents;i++){    
        if(
eventindex == iEvents[i]){
            
bFind true;
            break;
        }
    }
    
    if(!
bFind)    return FMRES_IGNORED;
    
    return 
FMRES_SUPERCEDE;
}
public 
client_connect(id)
{
   
g_silent[id]=false;
}
public 
cmd_silent(id)
{
   
g_silent[id]=!g_silent[id];
   
client_print(id,print_chat,"You have set SOUND:%s",g_silent[id]?"[off]":"[on]");
   return 
PLUGIN_HANDLED;

__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT

Last edited by AngeIII; 01-05-2013 at 10:13. Reason: g_silent[id]=!g_silent[id];
AngeIII is offline
Send a message via Skype™ to AngeIII
 



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 13:39.


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