Raised This Month: $ Target: $400
 0% 

Small code help please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pupdebox
Senior Member
Join Date: Feb 2016
Location: Wakanda
Old 04-26-2016 , 15:49   Small code help please
Reply With Quote #1

It allows ct players microphones but admins cant talk in terror team how to do it right ? I want admins can also talk like cts

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

#define PLUGIN "Block Mic"
#define VERSION "1.0"
#define AUTHOR "Unknown"

public plugin_init() {
    
    register_forward(FM_Voice_SetClientListening, "FwdSetVoice"); 
}
public FwdSetVoice(receiver, sender, listen) {   
    
    if( get_user_team(sender) != 2 || !(get_user_flags(sender) & ADMIN_BAN) ) {
        engfunc(EngFunc_SetClientListening, receiver, sender, 0);  
        return FMRES_SUPERCEDE;  
    }
    return FMRES_IGNORED  
}

Last edited by pupdebox; 04-26-2016 at 15:56.
pupdebox is offline
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 04-26-2016 , 16:45   Re: Small code help please
Reply With Quote #2

try

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Block Mic"
#define VERSION "1.0"
#define AUTHOR "Unknown"

public plugin_init() {

register_forward(FM_Voice_SetClientListening, "FwdSetVoice");
}
public FwdSetVoice(receiver, sender, listen) {

if( (get_user_team(sender) != 2) && !(get_user_flags(sender) & ADMIN_BAN) ) {
engfunc(EngFunc_SetClientListening, receiver, sender, 0);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED
}

Last edited by EDUTz; 04-26-2016 at 17:00.
EDUTz is offline
pupdebox
Senior Member
Join Date: Feb 2016
Location: Wakanda
Old 04-27-2016 , 04:35   Re: Small code help please
Reply With Quote #3

thx man
pupdebox is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-27-2016 , 16:07   Re: Small code help please
Reply With Quote #4

Quote:
Originally Posted by EDUTz View Post
try

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Block Mic"
#define VERSION "1.0"
#define AUTHOR "Unknown"

public plugin_init() {

register_forward(FM_Voice_SetClientListening, "FwdSetVoice");
}
public FwdSetVoice(receiver, sender, listen) {

if( (get_user_team(sender) != 2) && !(get_user_flags(sender) & ADMIN_BAN) ) {
engfunc(EngFunc_SetClientListening, receiver, sender, 0);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED
}
add php code
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
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 13:10.


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