Raised This Month: $ Target: $400
 0% 

Menu does only make first thing


Post New Thread Reply   
 
Thread Tools Display Modes
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-26-2011 , 12:22   Re: Menu does only make first thing
Reply With Quote #11

I don't understand, could you make an example from this in my Code?
Kia is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-26-2011 , 18:42   Re: Menu does only make first thing
Reply With Quote #12

Quote:
Originally Posted by Kia View Post
I don't understand, could you make an example from this in my Code?
You mean you want me to do it for you . . .
__________________
fysiks is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-27-2011 , 10:52   Re: Menu does only make first thing
Reply With Quote #13

If you would do, I would be very thankful.
Kia is offline
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 04-27-2011 , 14:30   Re: Menu does only make first thing
Reply With Quote #14

very thank full !!!
Quote:
Originally Posted by Kia View Post
Are you kidding me?
I want the Players Menu IN the Glow Menu so the Menu has this Order :

1) Choose Player
2) Choose Color
3) Glow Player
Attached Thumbnails
Click image for larger version

Name:	de_dust20016.jpg
Views:	96
Size:	97.3 KB
ID:	85315   Click image for larger version

Name:	de_dust20018.jpg
Views:	100
Size:	97.3 KB
ID:	85316   Click image for larger version

Name:	de_dust20019.jpg
Views:	107
Size:	92.8 KB
ID:	85317   Click image for larger version

Name:	de_dust20020.jpg
Views:	107
Size:	96.5 KB
ID:	85318  
__________________

Last edited by vato loco [GE-S]; 04-27-2011 at 14:47.
vato loco [GE-S] is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-27-2011 , 15:28   Re: Menu does only make first thing
Reply With Quote #15

And what do you want to tell me with this?
Kia is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-01-2011 , 03:48   Re: Menu does only make first thing
Reply With Quote #16

I tried to put your code in, but it doesn't work :
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

new g_iTarget[33];

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); 
    } 
    
g_iTarget[id] = str_to_num(data)
    
    
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)
    
    
    new 
key str_to_num(data)
    switch(
key)
    {
        case 
1:
        {
            
set_user_rendering(g_iTarget[id], kRenderFxGlowShell25500kRenderNormal20)
            
client_print(0print_chat"[JailMod] %s leuchtet jetzt Rot.",g_iTarget[id] )
        }
        case 
2:
        {
            
set_user_rendering(g_iTarget[id], kRenderFxGlowShell00255kRenderNormal20)
            
client_print(0print_chat"[JailMod] %s leuchtet jetzt Blau."g_iTarget[id])
        }
        case 
3:
        {
            
set_user_rendering(g_iTarget[id], kRenderFxGlowShell02550kRenderNormal20)
            
client_print(0print_chat"[JailMod] %s leuchtet jetzt Gruen.",g_iTarget[id] )
        }
        case 
4:
        {
            
set_user_rendering(g_iTarget[id], kRenderFxGlowShell000kRenderNormal20)
            
client_print(0print_chat"[JailMod] %s leuchtet nun nicht mehr.",g_iTarget[id] )
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

Kia is offline
Schwabba
Senior Member
Join Date: Apr 2008
Old 05-01-2011 , 04:06   Re: Menu does only make first thing
Reply With Quote #17

You have to set:

PHP Code:
g_iTarget[id] = str_to_num(data
in public GlowMenu and not in public vorGlow.

Also you have to add:

PHP Code:
new data[6]
new 
accesscallback
new szName[32], szTempid[10];
new 
players[32], pnumtempid;
menu_item_getinfo(menuitemaccessdatacharsmax(data), szNamecharsmax(szName), callback
above it.

you have to change:
PHP Code:
public GlowMenu(id
to:
PHP Code:
public GlowMenu(idmenuitem
and if you want to post the names correct, insert:
PHP Code:
get_user_name(g_iTarget[id], szName32
under:
PHP Code:
switch(key) { 
in public GlowHandler and print:
PHP Code:
szName 
instead of:
PHP Code:
g_iTarget[id
and it would be better to repeat:
PHP Code:
if (cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id)) 
{  
return 
PLUGIN_HANDLED

in public GlowHandler, because he can switch the teams and give himself a freeday, if he have the menu still open. If the player disconnects or die while you play with the menu, you glow a player who's not on the server or someone who's dead, so you have to add:
PHP Code:
if(!is_user_alive(id)) 
{  
return 
PLUGIN_HANDLED

to public glowHandler.

Last edited by Schwabba; 05-01-2011 at 04:47.
Schwabba is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-01-2011 , 13:35   Re: Menu does only make first thing
Reply With Quote #18

Yo, thanks Chris.
Kia is offline
Reply



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