Raised This Month: $ Target: $400
 0% 

help | in menus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Swisa
Senior Member
Join Date: Nov 2010
Location: Israel
Old 08-09-2012 , 12:35   help | in menus
Reply With Quote #1

How can I make a menu just one team ct or terrorist.
Swisa is offline
Send a message via Skype™ to Swisa
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-09-2012 , 12:47   Re: help | in menus
Reply With Quote #2

Search, bro.
There is a great tut in the Snippets section written by emp. "New Menu System" or something like that
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 08-09-2012 , 12:49   Re: help | in menus
Reply With Quote #3

Check the team and then create the menu.

Last edited by dark_style; 08-09-2012 at 12:50.
dark_style is offline
Swisa
Senior Member
Join Date: Nov 2010
Location: Israel
Old 08-09-2012 , 13:12   Re: help | in menus
Reply With Quote #4

this? but he can to join to ammo menu

PHP Code:
    if( get_user_teamclient ) == )
    {
        
menu_additemmMenu"Health\r/\w Armor\r/\w XP Menus""0" );
        
menu_additemmMenu"Grenades Menu""1" );
        
menu_additemmMenu"Weapons Menu""2" );
        
menu_additemmMenu"Powers Menu^n""3" );
        
menu_additemmMenu"Ammo Menu""4" );
        
menu_additemmMenumItem"5" );    
        
menu_setpropmMenuMPROP_EXITNAME"Close Shop" );
        
menu_setpropmMenuMPROP_NUMBER_COLOR"\w" );
        
menu_displayclientmMenu );
        return 
1;
    }
    else
    {
        
menu_additemmMenu"Health\r/\w Armor\r/\w XP Menus""0" );
        
menu_additemmMenu"Grenades Menu""1" );
        
menu_additemmMenu"\dWeapons Menu [ \rOnly For T \w]""2" );
        
menu_additemmMenu"Powers Menu^n""3" );
        
menu_additemmMenu"\dAmmo Menu [ \rOnly For T \w]""4" );
        
menu_additemmMenumItem"5" );    
        
menu_setpropmMenuMPROP_EXITNAME"Close Shop" );
        
menu_setpropmMenuMPROP_NUMBER_COLOR"\w" );
        
menu_displayclientmMenu );
        return 
1;
    } 
Swisa is offline
Send a message via Skype™ to Swisa
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-09-2012 , 13:15   Re: help | in menus
Reply With Quote #5

I suggest you to use cs_get_user_team.
guipatinador is offline
Swisa
Senior Member
Join Date: Nov 2010
Location: Israel
Old 08-09-2012 , 13:19   Re: help | in menus
Reply With Quote #6

PHP Code:
if(cs_get_user_team(client) == CS_TEAM_T)
    { 
        
menu_additemmMenu"Health\r/\w Armor\r/\w XP Menus""0" ); 
        
menu_additemmMenu"Grenades Menu""1" ); 
        
menu_additemmMenu"Weapons Menu""2" ); 
        
menu_additemmMenu"Powers Menu^n""3" ); 
        
menu_additemmMenu"Ammo Menu""4" ); 
        
menu_additemmMenumItem"5" );     
        
menu_setpropmMenuMPROP_EXITNAME"Close Shop" ); 
        
menu_setpropmMenuMPROP_NUMBER_COLOR"\w" ); 
        
menu_displayclientmMenu ); 
        return 
1
    } 
    else 
    { 
        
menu_additemmMenu"Health\r/\w Armor\r/\w XP Menus""0" ); 
        
menu_additemmMenu"Grenades Menu""1" ); 
        
menu_additemmMenu"\dWeapons Menu [ \rOnly For T \w]""2" ); 
        
menu_additemmMenu"Powers Menu^n""3" ); 
        
menu_additemmMenu"\dAmmo Menu [ \rOnly For T \w]""4" ); 
        
menu_additemmMenumItem"5" );     
        
menu_setpropmMenuMPROP_EXITNAME"Close Shop" ); 
        
menu_setpropmMenuMPROP_NUMBER_COLOR"\w" ); 
        
menu_displayclientmMenu ); 
        return 
1
    } 
this??

Last edited by Swisa; 08-09-2012 at 13:19.
Swisa is offline
Send a message via Skype™ to Swisa
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-09-2012 , 13:33   Re: help | in menus
Reply With Quote #7

a better way of doing this would be to use a menu callback.
Then check the team inside the callback and enable/disable the item accordingly.
Explained in that tut.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 08-09-2012 at 13:34.
Liverwiz is offline
Swisa
Senior Member
Join Date: Nov 2010
Location: Israel
Old 08-09-2012 , 13:43   Re: help | in menus
Reply With Quote #8

I do not understand you can give me an example?
thnx
Swisa is offline
Send a message via Skype™ to Swisa
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-09-2012 , 13:45   Re: help | in menus
Reply With Quote #9

Quote:
Originally Posted by Swisa View Post
this??
Take a look at this http://forums.alliedmods.net/showpos...14&postcount=4
guipatinador is offline
Old 08-09-2012, 13:46
dark_style
This message has been deleted by dark_style. Reason: nvm
Swisa
Senior Member
Join Date: Nov 2010
Location: Israel
Old 08-09-2012 , 13:51   Re: help | in menus
Reply With Quote #10

i do this.. this is the full
PHP Code:
public CmdOpenShopclient )
{
    new 
mMenu menu_create"\r|\wHNS\r| \yShop Menu""CmdHandler" ), mItem[128];
    
formatmItemcharsmaxmItem ), "Respawn \r[ \w32000$ \r]");
    
        if( 
cs_get_user_team(id) == CS_TEAM_T )
    {
        
menu_additemmMenu"Health\r/\w Armor\r/\w XP Menus""0" );
        
menu_additemmMenu"Grenades Menu""1" );
        
menu_additemmMenu"Weapons Menu""2" );
        
menu_additemmMenu"Powers Menu^n""3" );
        
menu_additemmMenu"Ammo Menu""4" );
        
menu_additemmMenumItem"5" );    
        
menu_setpropmMenuMPROP_EXITNAME"Close Shop" );
        
menu_setpropmMenuMPROP_NUMBER_COLOR"\w" );
        
menu_displayclientmMenu );
        return 
1;
    }
    else
    {
        
menu_additemmMenu"Health\r/\w Armor\r/\w XP Menus""0" );
        
menu_additemmMenu"Grenades Menu""1" );
        
menu_additemmMenu"\dWeapons Menu [ \rOnly For T \w]""2" );
        
menu_additemmMenu"Powers Menu^n""3" );
        
menu_additemmMenu"\dAmmo Menu [ \rOnly For T \w]""4" );
        
menu_additemmMenumItem"5" );    
        
menu_setpropmMenuMPROP_EXITNAME"Close Shop" );
        
menu_setpropmMenuMPROP_NUMBER_COLOR"\w" );
        
menu_displayclientmMenu );
        return 
1;
    }

Swisa is offline
Send a message via Skype™ to Swisa
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 05:45.


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