Jump to content

[ Plugin-RF ] Voice Admin Only


LuK.ZEW #

Recommended Posts

Descriere : Acest plugin , permite doar adminilor sa vorbeasca la microfon prin intermediul HLSS
Versiune : 1.1
Autor : xPaw
 
Instalare :
1. Fisierul VoiceAdminOnly.sma il puneti in addons/amxmodx/scripting
2. Fisierul VoiceAdminOnly.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma: 
VoiceAdminOnly.amxx

Cvar :

sv_voiceadminonly 0/1 - 1 activat , 0 dezactivat

 

Descarcare :

#include < amxmodx >
#include < fakemeta >


#define SetPlayerBits(%1,%2)    ( %1 |=    1 << ( %2 & 31 ) )
#define ClearPlayerBits(%1,%2)  ( %1 &= ~( 1 << ( %2 & 31 ) ) )
#define GetPlayerBits(%1,%2)    ( %1 &     1 << ( %2 & 31 ) )


new g_pEnabled, g_bAdmin;


public plugin_init( ) {
register_plugin( "Voice Admin Only", "1.1", "xPaw" );


g_pEnabled = register_cvar( "sv_voiceadminonly", "1" );


register_forward( FM_Voice_SetClientListening, "FwdSetClientListening" );
}


public client_authorized( id )
if( get_user_flags( id ) & ADMIN_CHAT )
SetPlayerBits( g_bAdmin, id );


public client_disconnect( id )
ClearPlayerBits( g_bAdmin, id );


public FwdSetClientListening( iReceiver, iSender, bool:bListen ) {
if( GetPlayerBits( g_bAdmin, iSender ) && get_pcvar_num( g_pEnabled ) > 0 ) {
engfunc( EngFunc_SetClientListening, iReceiver, iSender, false );
forward_return( FMV_CELL, false );


return FMRES_SUPERCEDE;
}


return FMRES_IGNORED;
} 

http://www.fileshare.ro/e31714202

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...