Raised This Month: $ Target: $400
 0% 

Disable spectating for certain players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fvRate
Junior Member
Join Date: May 2018
Old 05-08-2018 , 20:58   Re: Disable spectating for certain players
Reply With Quote #1

This will do the job :

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <fakemeta> #pragma semicolon         1 #define ADMIN_ACCES     ADMIN_KICK #define ADMIN_VIP       ADMIN_LEVEL_H #define FFADE_STAYOUT   0x0004 new msg_ScreenFade; public plugin_init( ) {     register_plugin     (         .plugin_name    = "Plugin",         .version         = "1.0",         .author         = "fvRate"     );         register_event( "SpecHealth2", "event_Spec", "bd" );         msg_ScreenFade = get_user_msgid( "ScreenFade" ); } public event_Spec( index ) {       new specIndex = read_data(2);         if( specIndex == index && !( get_user_flags( specIndex ) & ADMIN_VIP ) )         return;         ( get_user_flags( specIndex ) & ADMIN_ACCES  ) ?         set_Fade( index, false  ) :         set_Fade( index, true ) ; } stock set_Fade( index, bool:fadeState ) {     message_begin( MSG_ONE_UNRELIABLE, msg_ScreenFade, _, index );     {         write_short( 0 );         write_short( 0 );         write_short( fadeState ? FFADE_STAYOUT : ~FFADE_STAYOUT );         write_byte( 0 );         write_byte( 0 );         write_byte( 0 );         write_byte( 255 );     }     message_end( ); }

Last edited by fvRate; 05-09-2018 at 09:16.
fvRate 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 04:40.


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