Raised This Month: $ Target: $400
 0% 

Menu does only make first thing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-24-2011 , 05:56   Menu does only make first thing
Reply With Quote #1

Hello everybody,
I have a problem with my Glow Menu, I tried to change izzles Glow Menu so you can choose a color, but only first Color works, the others doesnt.

PHP Code:
#include <amxmodx> 
#include <cstrike> 
#include <fun> 
#include <hamsandwich> 
public plugin_init() 

    
register_plugin("JailBreak Glow Menu""1.1""Kia"
    
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("\rGlow Menu:""sub_menu"); 
    
    new 
players[32], pnumtempid
    new 
szName[32], szTempid[10]; 
    
    
get_players(playerspnum"a"); 
    
    for( new 
ii<pnumi++ ) 
    { 
        
tempid players[i]; 
        
        
        
        
get_user_name(tempidszName31); 
        
num_to_str(tempidszTempid9); 
        
menu_additem(menuszNameszTempid0); 
    } 
    
    
menu_display(idmenu); 
    return 
PLUGIN_HANDLED

public 
sub_menu(idmenuitem

    
    new 
data[6], iName[64]; 
    new 
accesscallback
    
menu_item_getinfo(menuitemaccessdata,5iName63callback); 
    
    new 
menu menu_create("Glow Farbe:""farbe_handler")
    
    
menu_additem(menu"Rot""1"0);
    
menu_additem(menu"Gruen""2"0);
    
menu_additem(menu"Blau""3"0);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu);
    
 
    return 
PLUGIN_HANDLED
}  

public 
farbe_handler(idmenuitem)
{
    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); 
    
    new 
key str_to_num(data)
    switch(
key)
    {
        case 
1:
        {
            
set_user_rendering(tempidkRenderFxGlowShell25500kRenderNormal20)
            
client_print(0,print_chat,"[JailMod] %s glowte %s^n in Rot"szNameszName2);
        }
        case 
2:
        {
            
set_user_rendering(tempidkRenderFxGlowShell02550kRenderNormal20)
            
client_print(0,print_chat,"[JailMod] %s glowte %s^n in Blau "szNameszName2);
        }
        case 
3:
        {
            
set_user_rendering(tempidkRenderFxGlowShell00255kRenderNormal20)
            
client_print(0,print_chat,"[JailMod] %s glowte %s^n in Gruen"szNameszName2);
        }
    }

Kia is offline
 



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 20:11.


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