Raised This Month: $ Target: $400
 0% 

Glow with Adminflag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpokY
Senior Member
Join Date: Feb 2009
Location: Darmstadt
Old 02-05-2010 , 13:28   Glow with Adminflag
Reply With Quote #1

Hello Guy's

I have found this Plugin

Code:
#include <amxmodx> 
#include <cstrike> 
#include <fun> 
#include <hamsandwich> 

public plugin_init() 
{ 
    register_plugin("JailBreak Glow Menu", "1.1", "izzle") 
    register_clcmd( "say /glow","JBGlowMenu"); 
    register_clcmd( "say_team /glow","JBGlowMenu"); 
    
    RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1) 
} 

public fw_PlayerSpawn_Post(id) 
{ 
    set_user_rendering(id)    
} 

public JBGlowMenu(id) 
{ 
    if (cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id)) 
    {  
        return PLUGIN_HANDLED; 
    } 
    new menu = menu_create("\rJB Glow Menu:", "sub_menu"); 
    
    new players[32], pnum, tempid; 
    new szName[32], szTempid[10]; 
    
    get_players(players, pnum, "a"); 
    
    for( new i; i<pnum; i++ ) 
    { 
        tempid = players[i]; 
        
        if (cs_get_user_team(tempid) != CS_TEAM_T) 
        { 
            continue; 
        } 
        
        get_user_name(tempid, szName, 31); 
        num_to_str(tempid, szTempid, 9); 
        menu_additem(menu, szName, szTempid, 0); 
    } 
    
    menu_display(id, menu); 
    return PLUGIN_HANDLED; 
} 

public sub_menu(id, menu, item) 
{ 
    if( item == MENU_EXIT ) 
    { 
        menu_destroy(menu); 
        return PLUGIN_HANDLED; 
    } 
    
    new data[6], iName[64]; 
    new access, callback; 
    menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); 
    
    new tempid = str_to_num(data); 
    new szName[32], szName2[32]; 
    get_user_name(id, szName, 31); 
    get_user_name(tempid, szName2, 31); 
    set_user_rendering(tempid, kRenderFxGlowShell, 255, 140, 0, kRenderNormal, 20) 
    set_hudmessage(0, 255, 0) 
    show_hudmessage(0, "[JBGM] %s gab %s^n einen Freeday und er ist nun am Leuchten!", szName, szName2); 
    
    menu_destroy(menu); 
    return PLUGIN_HANDLED; 
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
have i can make it that only users with for example X adminflag on the users.ini can use this plugin?

Thanks a lot
__________________
xtream.eSports Weil's einfach nur Geil ist !
www.xtream-esports.com
SpokY is offline
Send a message via ICQ to SpokY Send a message via MSN to SpokY
master4life
Senior Member
Join Date: Mar 2006
Location: Germany
Old 02-05-2010 , 14:35   Re: Glow with Adminflag
Reply With Quote #2

PHP Code:
#include <amxmodx> 
#include <cstrike> 
#include <fun> 
#include <hamsandwich> 

public plugin_init() 

    
register_plugin("JailBreak Glow Menu""1.1""izzle"
    
register_clcmd"say /glow","JBGlowMenu"); 
    
register_clcmd"say_team /glow","JBGlowMenu"); 
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1


public 
fw_PlayerSpawn_Post(id

    
set_user_rendering(id)    


public 
JBGlowMenu(id

    if( !(
get_user_flagsid ) & ADMIN_KICK) ) 
        return 
PLUGIN_CONTINUE;

    new 
menu menu_create("\rJB Glow Menu:""sub_menu"); 
    
    new 
players[32], pnumtempid
    new 
szName[32], szTempid[10]; 
    
    
get_players(playerspnum"a"); 
    
    for( new 
ii<pnumi++ ) 
    { 
        
tempid players[i]; 
        
        if (
cs_get_user_team(tempid) != CS_TEAM_T
        { 
            continue; 
        } 
        
        
get_user_name(tempidszName31); 
        
num_to_str(tempidszTempid9); 
        
menu_additem(menuszNameszTempid0); 
    } 
    
    
menu_display(idmenu); 
    return 
PLUGIN_HANDLED


public 
sub_menu(idmenuitem

    if( 
item == MENU_EXIT 
    { 
        
menu_destroy(menu); 
        return 
PLUGIN_HANDLED
    } 
    
    new 
data[6], iName[64]; 
    new 
accesscallback
    
menu_item_getinfo(menuitemaccessdata,5iName63callback); 
    
    new 
tempid str_to_num(data); 
    new 
szName[32], szName2[32]; 
    
get_user_name(idszName31); 
    
get_user_name(tempidszName231); 
    
set_user_rendering(tempidkRenderFxGlowShell2551400kRenderNormal20
    
set_hudmessage(02550
    
show_hudmessage(0"[JBGM] %s gab %s^n einen Freeday und er ist nun am Leuchten!"szNameszName2); 
    
    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED

__________________


[img]http://img714.**************/img714/8612/33726.png[/img]
master4life is offline
Send a message via ICQ to master4life Send a message via MSN to master4life Send a message via Skype™ to master4life
SpokY
Senior Member
Join Date: Feb 2009
Location: Darmstadt
Old 02-05-2010 , 15:17   Re: Glow with Adminflag
Reply With Quote #3

which line?
__________________
xtream.eSports Weil's einfach nur Geil ist !
www.xtream-esports.com
SpokY is offline
Send a message via ICQ to SpokY Send a message via MSN to SpokY
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-05-2010 , 15:45   Re: Glow with Adminflag
Reply With Quote #4

Quote:
Originally Posted by SpokY View Post
which line?
Quote:
Originally Posted by master4life View Post
PHP Code:
public JBGlowMenu(id

    if( !(
get_user_flagsid ) & ADMIN_KICK 
        return 
PLUGIN_CONTINUE

Last edited by Seta00; 02-05-2010 at 18:15.
Seta00 is offline
SpokY
Senior Member
Join Date: Feb 2009
Location: Darmstadt
Old 02-05-2010 , 18:13   Re: Glow with Adminflag
Reply With Quote #5

the adminflags are abcdef......

can u make it only for l or ö or something?

thanks
__________________
xtream.eSports Weil's einfach nur Geil ist !
www.xtream-esports.com
SpokY is offline
Send a message via ICQ to SpokY Send a message via MSN to SpokY
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-05-2010 , 18:16   Re: Glow with Adminflag
Reply With Quote #6

Code:
#define ADMIN_ALL		0	/* everyone */
#define ADMIN_IMMUNITY		(1<<0)	/* flag "a" */
#define ADMIN_RESERVATION	(1<<1)	/* flag "b" */
#define ADMIN_KICK		(1<<2)	/* flag "c" */
#define ADMIN_BAN		(1<<3)	/* flag "d" */
#define ADMIN_SLAY		(1<<4)	/* flag "e" */
#define ADMIN_MAP		(1<<5)	/* flag "f" */
#define ADMIN_CVAR		(1<<6)	/* flag "g" */
#define ADMIN_CFG		(1<<7)	/* flag "h" */
#define ADMIN_CHAT		(1<<8)	/* flag "i" */
#define ADMIN_VOTE		(1<<9)	/* flag "j" */
#define ADMIN_PASSWORD		(1<<10)	/* flag "k" */
#define ADMIN_RCON		(1<<11)	/* flag "l" */
#define ADMIN_LEVEL_A		(1<<12)	/* flag "m" */
#define ADMIN_LEVEL_B		(1<<13)	/* flag "n" */
#define ADMIN_LEVEL_C		(1<<14)	/* flag "o" */
#define ADMIN_LEVEL_D		(1<<15)	/* flag "p" */
#define ADMIN_LEVEL_E		(1<<16)	/* flag "q" */
#define ADMIN_LEVEL_F		(1<<17)	/* flag "r" */
#define ADMIN_LEVEL_G		(1<<18)	/* flag "s" */
#define ADMIN_LEVEL_H		(1<<19)	/* flag "t" */
#define ADMIN_MENU		(1<<20)	/* flag "u" */
#define ADMIN_ADMIN		(1<<24)	/* flag "y" */
#define ADMIN_USER		(1<<25)	/* flag "z" */
__________________
fysiks is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-05-2010 , 18:16   Re: Glow with Adminflag
Reply With Quote #7

Quote:
Originally Posted by SpokY View Post
the adminflags are abcdef......

can u make it only for l or ö or something?

thanks
PHP Code:
public JBGlowMenu(id

    if( ~
get_user_flagsid ) & (ADMIN_RCON ADMIN_LEVEL_C ADMIN_LEVEL_SOMETHING) )
        return 
PLUGIN_CONTINUE

Last edited by Seta00; 02-05-2010 at 18:19.
Seta00 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-05-2010 , 18:17   Re: Glow with Adminflag
Reply With Quote #8

Quote:
Originally Posted by Seta00 View Post
PHP Code:
public JBGlowMenu(id

    if( !(
get_user_flagsid ) & (ADMIN_LEVEL_L ADMIN_LEVEL_O ADMIN_LEVEL_SOMETHING) )
        return 
PLUGIN_CONTINUE
Wow, Seta, that is so wrong.
__________________
fysiks is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-05-2010 , 18:19   Re: Glow with Adminflag
Reply With Quote #9

Sorry, forgot the order. Edited original post.
Seta00 is offline
SpokY
Senior Member
Join Date: Feb 2009
Location: Darmstadt
Old 02-05-2010 , 18:47   Re: Glow with Adminflag
Reply With Quote #10

Code:
public JBGlowMenu(id) 
{ 
    if( !(get_user_flags( id ) & ADMIN_LEVEL_H ) 
        return PLUGIN_CONTINUE; 


thats correct ?

thanks
__________________
xtream.eSports Weil's einfach nur Geil ist !
www.xtream-esports.com
SpokY is offline
Send a message via ICQ to SpokY Send a message via MSN to SpokY
Reply


Thread Tools
Display Modes

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 07:27.


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