Raised This Month: $ Target: $400
 0% 

Problems with a menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-07-2006 , 09:23   Problems with a menu
Reply With Quote #1

This function works:
Code:
<font size="2"> register_menucmd( register_menuid("Do you want to execute command: ?"), 1023, "Confirm" ) public Askmenu(id){ new szMenuBody[256] new keys format( szMenuBody, 255, "Do you want to execute command: ? ^n1. Yes!^n2 No!^n3. Exit") keys = (1<<0|1<<1|1<<2) show_menu( id, keys, szMenuBody, -1 ) return PLUGIN_HANDLED } public Confirm( id , key ) { switch( key ) { case 0: { client_print(id,print_chat,"Yes") log_amx("YES") } case 1: { client_print(id,print_chat,"No") log_amx("YES") } default: { client_print(id,print_chat,"DEBUG!") } } return PLUGIN_HANDLED } </font>


But this doesn't work (i use this function inside another function),both players are recognised but 'yes' or 'no' does not work, i get the original botmenu (ESF).

Code:
<font size="2"> register_menucmd( register_menuid("Do you want to do things with: ?"), 1023, "Confirm" ) public FusionAskmenu(id,id2){ new szMenuBody[256] new keys new szUserName[32] get_user_name( id2, szUserName, 31 ) format( szMenuBody, 255, "Do you want to do things with: %s? ^n1. Yes!^n2 No!^n3. Exit",szUserName) keys = (1<<0|1<<1|1<<2) show_menu( id, keys, szMenuBody, -1 ) return PLUGIN_HANDLED } public Confirm( id , key ) { switch( key ) { case 0: { client_print(id,print_chat,"Yes") log_amx("YES") } case 1: { client_print(id,print_chat,"No") log_amx("YES") } default: { client_print(id,print_chat,"DEBUG!") } } return PLUGIN_HANDLED } </font>

Does this problem has to do with implenting the name in the 'Ask menu'?
Thanks in advance
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.

Last edited by dutchmeat; 12-07-2006 at 09:27.
dutchmeat 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 06:54.


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