Raised This Month: $ Target: $400
 0% 

block team chooser


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mazke
Junior Member
Join Date: Oct 2007
Old 11-26-2007 , 03:12   block team chooser
Reply With Quote #1

is it possible to make that only admins with imunity, flag "a" can choose team?

here is my code:

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Block Team Change""1.0""...");
    
register_clcmd("chooseteam""cmdChooseTeam");
}

public 
cmdChooseTeam(id)
{
    
client_print(idprint_chat"[AMXX] You are not permitted to switch teams.");
    
    return 
PLUGIN_HANDLED;

Mazke is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-26-2007 , 04:25   Re: block team chooser
Reply With Quote #2

Code:
if ( get_user_flags(id) & ADMIN_IMMUNITY )    return PLUGIN_CONTINUE;

Add it before client_print().
[ --<-@ ] Black Rose is offline
Mazke
Junior Member
Join Date: Oct 2007
Old 11-26-2007 , 06:59   Re: block team chooser
Reply With Quote #3

it works. thx alot: )
__________________
84.48.59.235:27015 Maske hideNseek
Mazke 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 11:03.


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