Monthly Target: $400 Donations: $293
 73% 

Jailbreak Glow Menu v2.0


Post New Thread Reply   
 
Thread Tools Display Modes
Astors
New Member
Join Date: Mar 2012
Old 03-14-2012 , 17:01   Re: Jailbreak Glow Menu v2.0
Reply With Quote #11

I think that instead of all the colors menu you can put a random color.

take an example:

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

new g_iMsgSync;

public 
plugin_init( ) {
    
register_plugin"Glow Menu""0.1""Author" );
    
    
register_clcmd"say""say_handle" );
    
register_clcmd"say_team""say_handle" );
    
    
g_iMsgSync CreateHudSyncObj( );
}

public 
say_handleclient ) {
    new 
sMessage32 ];
    
read_argssMessagecharsmaxsMessage ) );
    
remove_quotessMessage );
    
    if( 
equalsMessage"/glow" ) || equalsMessage"!glow" ) )
        
GlowSystemclient );
}

public 
GlowSystemclient ) {
    if( 
get_user_teamclient ) != && is_user_aliveclient ) )
    {
        new 
Gmenu menu_create"\r[\y JailBreak\r ]\y Glow Menu:""glow_menu_handler" );
        
        new 
cPlayers32 ], cNumiPlayersClient32 ], siPlayer10 ], Item100 ];
        
        
get_playerscPlayerscNum"a" );
        
        for( new 
icNumi++ )
        {
            
iPlayer cPlayers];
            
            if( 
get_user_teamiPlayer ) != || !is_user_aliveiPlayer ) )
            {
                continue;
            }
            
            
get_user_nameiPlayersClient,31 );
            
num_to_striPlayersiPlayer);
            
formatexItem99"\r%s"sClient );
            
menu_additemGmenuItemsiPlayer );
            
            
menu_setpropGmenuMPROP_EXITNAME"\yClose" );
            
menu_setpropGmenuMPROP_NUMBER_COLOR"\d" );
        }
        
menu_displayclientGmenu );
    }
}

public 
glow_menu_handlerclientGmenuItem )
{
    if( 
Item == MENU_EXIT || !is_user_aliveclient ) )
    {
        
menu_destroyclient );
        return;
    }
    
    new 
cData], cName64 ], cAccesscCallback;
    
menu_item_getinfoGmenuItemcAccesscData5cName63cCallback );
    
    new 
iPlayer str_to_numcData );
    new 
szSender32 ], szTarget32 ];
    
get_user_nameclientszSender31 );
    
get_user_nameiPlayerszTarget31 );
    
    
set_user_renderingiPlayerkRenderFxGlowShellrandom_num0250 ), random_num0250 ), random_num0250 ), kRenderFxGlowShell180 );
    
New_Chat0"^4%s^1 Gave Glow to^4 %s."szSenderszTarget );
    
set_hudmessage2501000, -1.00.1826.09.0 );
    
ShowSyncHudMsg0g_iMsgSync"%s Gave Glow to %s"szSenderszTarget );
    
    
menu_destroyGmenu );
    return;
}

stock New_Chat(const id, const string[], {FloatSqlResul,_}:...)
{
    new 
msg[191], players[32], count 1;
    
    static 
len;
    
len formatex(msgcharsmax(msg), "^4[^1 JailBreak^4 ]^1 ");
    
vformat(msg[len], charsmax(msg) - lenstring3);
    
    if(
id)         players[0] = id;
    else         
get_players(players,count,"ch");
    
    for (new 
0counti++)
    {
        if(
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"),_players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
    }

Astors is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 03-16-2012 , 07:12   Re: Jailbreak Glow Menu v2.0
Reply With Quote #12

@Astors Or he could add Another Option to make a random color.
__________________
Ex1ne is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-30-2012 , 08:05   Re: Jailbreak Glow Menu v2.0
Reply With Quote #13

instead of using a new case for every single color, you could use:

PHP Code:
#define MaxColors 9

new const iColors[MaxColors][] = {
    
"Red Glow",
    
"Blue Glow",
    
"White Glow",
    
"Green Glow",
    
"Yellow Glow",
    
"Purple Glow",
    
"Purple Glow (Weird)",
    
"Cyan Glow",
    
"Blue Glow (Weird)"
}

new 
iColorCodes[MaxColors] = {
    {
25500},
    {
00255},
    {
255255255},
    {
02550},
    {
2552550},
    {
2550180},
    {
173054255},
    {
0255255},
    {
0131255}

PHP Code:
case 1..9: {
            
set_user_rendering(Player[iPlayer], kRenderFxGlowShelliColorCodes[key][0], iColorCodes[key][1], iColorCodes[key][2], kRenderNormal255)
            
ColorChat(0GREY"%s %s now has a ^4%s!"prefixNameiColor[iPlayer] )
        } 
Also, add an option to remove the glow.

For more information, take a look at my code.
http://forums.alliedmods.net/showthread.php?t=170660
__________________
Experience Mode: [100%]
HNS Achievements: [50%]
Member Menu: [100%]
Contact me for more info.

Skype:
jonas.schoenmakers
Steam:
Napoleon_be144
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-20-2014 , 07:53   Re: Jailbreak Glow Menu v2.0
Reply With Quote #14

Redundant, poorly coded, inactive author.

Unapproved.
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),

Arkshine is online now
JACK8
Junior Member
Join Date: Apr 2014
Location: Bosnian
Old 04-26-2014 , 10:35   Re: Jailbreak Glow Menu v2.0
Reply With Quote #15

How to add cvar on this plugin only say: /glow or /glowmenu CT ADMIN.
Flag: ADMIN_IMMUNITY ?
Please help for me ?
Thanks
JACK8 is offline
Send a message via AIM to JACK8 Send a message via Skype™ to JACK8
Old 04-27-2014, 06:38
JACK8
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 04-28-2014 , 01:07   Re: Jailbreak Glow Menu v2.0
Reply With Quote #16

Quote:
Originally Posted by JACK8 View Post
How to add cvar on this plugin only say: /glow or /glowmenu CT ADMIN.
Flag: ADMIN_IMMUNITY ?
Please help for me ?
Thanks
Code:
#define ADMIN_ACCESS ADMIN_IMMUNITY
+
PHP Code:
            if(cs_get_user_team(id) == CS_TEAM_CT || get_user_flags(id) & ADMIN_ACCESS
            { 

Last edited by Snitch; 04-28-2014 at 01:07.
Snitch is offline
Send a message via Skype™ to Snitch
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 15:07.


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