AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   block team chooser (https://forums.alliedmods.net/showthread.php?t=63643)

Mazke 11-26-2007 03:12

block team chooser
 
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;



[ --<-@ ] Black Rose 11-26-2007 04:25

Re: block team chooser
 
Code:
if ( get_user_flags(id) & ADMIN_IMMUNITY )    return PLUGIN_CONTINUE;

Add it before client_print().

Mazke 11-26-2007 06:59

Re: block team chooser
 
it works. thx alot: )


All times are GMT -4. The time now is 11:03.

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