Raised This Month: $12 Target: $400
 3% 

CloseHandle problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sniperzkiw
Junior Member
Join Date: Jul 2010
Old 05-12-2014 , 12:17   CloseHandle problem
Reply With Quote #1

Hello, How can i add this:

PHP Code:
CloseHandle(menu); 
in this code ?

PHP Code:
if ( action == MenuAction_Select 
    {    
        
        new 
String:info[32];
        
GetMenuItem(menuitemNuminfosizeof(info));
        
        return 
Plugin_Handled;
        if ( 
strcmp(info,"option1") == 
        {
            {
              
DID(client);
              
PrintToChat(client,"bla bla.");

            }
        } 

Last edited by sniperzkiw; 05-12-2014 at 12:18.
sniperzkiw is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-12-2014 , 12:29   Re: CloseHandle problem
Reply With Quote #2

Like this
PHP Code:
if ( action == MenuAction_Select 
    {    
        
        new 
String:info[32];
        
GetMenuItem(menuitemNuminfosizeof(info));
        
        return 
Plugin_Handled;
        if ( 
strcmp(info,"option1") == 
        {
            {
              
DID(client);
              
PrintToChat(client,"bla bla.");

            }
        }
    }
else if ( 
action == MenuAction_End )
    {
        
CloseHandle(menu);
    } 
That is to say you should only call CloseHandle on a menu in MenuAction_End.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 05-12-2014 at 12:29.
Powerlord is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 05-12-2014 , 12:41   Re: CloseHandle problem
Reply With Quote #3

random return plugin_handled in the middle... unreachable code.
Mitchell 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 01:40.


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