Raised This Month: $ Target: $400
 0% 

[HELP] Problem With menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 07-03-2014 , 11:41   [HELP] Problem With menu
Reply With Quote #1

solved

Last edited by Snitch; 02-20-2015 at 15:41.
Snitch is offline
Send a message via Skype™ to Snitch
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-03-2014 , 11:57   Re: [HELP] Problem With menu
Reply With Quote #2

Why you don't simply display a HUD message? I don't find sense in creating a menu.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 07-03-2014 , 12:03   Re: [HELP] Problem With menu
Reply With Quote #3

Picture related to my code. I show my problem
What appears to me 13 to exit

I just want to show Texts without
1: prices

Can you fix my code?
Snitch is offline
Send a message via Skype™ to Snitch
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-03-2014 , 12:33   Re: [HELP] Problem With menu
Reply With Quote #4

Set the third parameter of menu_addtext() to 0:

Eg: menu_additem( iMenu, "Prices:^n", 0 );
mottzi is offline
Send a message via MSN to mottzi
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 07-03-2014 , 12:55   Re: [HELP] Problem With menu
Reply With Quote #5

Seems to me you did not understand me.

I want no Handler >
Quote:
"CmdPricesHandler" );
Text appears just as it shows the
SuperAdmin
Without Number 1: or 2:

Last edited by Snitch; 07-03-2014 at 12:56.
Snitch is offline
Send a message via Skype™ to Snitch
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-03-2014 , 13:10   Re: [HELP] Problem With menu
Reply With Quote #6

Just use a HUD Message? What's the purpose of creating a menu only for this. Or better - use a MOTD window. There are better ways to achieve what you want in this case. Is there any reason you want a menu?
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 07-03-2014 , 18:38   Re: [HELP] Problem With menu
Reply With Quote #7

Quote:
format(iMenu,.............
__________________

Last edited by Eagle07; 07-03-2014 at 18:38.
Eagle07 is offline
Old 07-03-2014, 18:39
darklite
This message has been deleted by hornet. Reason: Unhelpful / Spam
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 07-03-2014 , 18:55   Re: [HELP] Problem With menu
Reply With Quote #9

Hey, Try
PHP Code:
#include < amxmodx >
 
new Info][ ] =
{
        
"Test Menu",
        
"1.0",
        
"Snitch"
};
 
public 
plugin_init()
{
    
register_pluginInfo], Info], Info] );
    
    
register_clcmd"say prices","PricesMenu" );
    
register_clcmd"say /prices","PricesMenu" );
    
register_clcmd"say_team /prices","PricesMenu" );
    
    
set_task(160.0,"Prices",.flags="b");
}

public 
Pricesclient )
{
        
ColorChat(client"Wanna buy cash or admin? type: /prices.")
}

public 
PricesMenuclient )
{  
    if ( !
is_user_connectedclient ) )
        return 
1;
        
    new 
iMenu[295]
    new 
keys MENU_KEY_0
    format
(iMenu295"Prices:^n\wManager: \y99 \rILS \d(per Month)^n\wSuperAdmin: \y75 \rILS \d(per Month)^n\wAdmin: \y50 \rILS \d(per Month)^n\wVIP: \y25 \rILS \d(per Month)^n----------------------------^n\w1,000,000 Cash: \y99 \rILS^n\w500,000 Cash: \y50 \rILS^n\w150,000 Cash: \y25 \rILS^n\rName Owner: \rSnitch^n^n0. \wExit"
    
show_menu(clientkeysiMenu
    
    return 
0;
}

public 
CmdPricesHandler(idkeymenu)
{
    if(
key == 0) {
         return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED
}    
 
stock ColorChat(const id, const input[], any:...)
{
        new 
count 1players[32]
        static 
msg[191]
        
vformat(msg190input3)
   
        
replace_all(msg190"!g""^4"// Green Color
        
replace_all(msg190"!y""^1"// Default Color
        
replace_all(msg190"!team""^3"// Team Color
   
        
if (idplayers[0] = id
        
else get_players(playerscount"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()
                }
        }

__________________
Eagle07 is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-03-2014 , 19:38   Re: [HELP] Problem With menu
Reply With Quote #10

PHP Code:
new iMenu[295
    
format(iMenu295//...... 
And this will resolve as one big "index out of bounds".... Use charsmax() instead of manually typing the size, because of errors like this.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
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 21:08.


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