Raised This Month: $ Target: $400
 0% 

Menu does only make first thing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-25-2011 , 04:40   Re: Menu does only make first thing
Reply With Quote #8

Well sorry, I tried to explain at good as I can.
This Menu does work almost perfect, but when I glow someone, he is only one that I can glow. I mean when I glow Player1 and want to glow Player2 after Player1, Player1 gets glow.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <cstrike>

#define PLUGIN "Glow Menu"
#define VERSION "1.0"
#define AUTHOR "vl"

#define OFFSET_TEAM 114

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn"1)
    
    
register_clcmd"say /glow","vorGlow")
    
register_clcmd"say_team /glow","vorGlow")
}

public 
fw_PlayerSpawn(id)
{
    if(
is_user_alive(id))
    {
        
set_user_rendering(id)
    }
}

public 
vorGlow(id)
{
    
    if (
cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id)) 
    {  
        return 
PLUGIN_HANDLED
    } 
    
    new 
menu menu_create("Glow Menu:""GlowMenu"); 
    
    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 
GlowMenu(id)
{
    
    
    if(!
is_user_alive(id) || get_pdata_int(idOFFSET_TEAM) != 2
    {  
        return 
PLUGIN_HANDLED
    
}
    new 
menu menu_create("Glow Menu:""GlowHandler")
    
    
menu_additem(menu"Rot""1"0)
    
menu_additem(menu"Blau""2"0)
    
menu_additem(menu"Gruen""3"0)
    
menu_additem(menu"UnGlow""4"0)
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
    return 
PLUGIN_HANDLED
}

public 
GlowHandler(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6]
    new 
accesscallback
    
new szName[32], szTempid[10];
    new 
players[32], pnumtempid;
    
menu_item_getinfo(menuitemaccessdatacharsmax(data), szNamecharsmax(szName), callback)
    
    
    
    
get_players(playerspnum"a"); 
    for( new 
ii<pnumi++ ) 
    { 
        
tempid players[i]; 
        
get_user_name(tempidszName31); 
        
num_to_str(tempidszTempid9); 
    }
    new 
key str_to_num(data)
    switch(
key)
    {
        case 
1:
        {
            
set_user_rendering(tempidkRenderFxGlowShell25500kRenderNormal20)
            
client_print(0print_chat"[JailMod] %s leuchtet jetzt Rot."tempid)
        }
        case 
2:
        {
            
set_user_rendering(tempidkRenderFxGlowShell00255kRenderNormal20)
            
client_print(0print_chat"[JailMod] %s leuchtet jetzt Blau."tempid)
        }
        case 
3:
        {
            
set_user_rendering(tempidkRenderFxGlowShell02550kRenderNormal20)
            
client_print(0print_chat"[JailMod] %s leuchtet jetzt Gruen."tempid)
        }
        case 
4:
        {
            
set_user_rendering(tempidkRenderFxGlowShell000kRenderNormal20)
            
client_print(0print_chat"[JailMod] %s leuchtet nun nicht mehr."tempid)
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

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