AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu Problem (https://forums.alliedmods.net/showthread.php?t=243926)

Spywar 07-11-2014 13:07

Menu Problem
 
Hi! So,I have this menu:

PHP Code:

                        new szName[32];
                
get_user_name(idszNamesizeof szName 1);
                
                new 
data[64];
                
formatex(data,charsmax(data),"\rDo you want to start a private conversation with %s?"szName);
                
                new 
menu menu_create(data"menu_handler");
                
                
formatex(datacharsmax(data),"\wYes")
                
menu_additem(menudata"0"0);
                
                
formatex(datacharsmax(data),"\wNo")
                
menu_additem(menudata"1"0);
                
                
menu_display(iPlayer,menu,0); 

How it's possible if the player choose yes to do a action?

ex:
PHP Code:

If(yes)
{
client_print(id,print_chat"You accept the money!")



mottzi 07-11-2014 13:27

Re: Menu Problem
 
Using the menu handler:
https://forums.alliedmods.net/showthread.php?t=46364


All times are GMT -4. The time now is 21:05.

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