Raised This Month: $ Target: $400
 0% 

Simple Menu (Terms of Agreement)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 07-13-2011 , 17:15   Simple Menu (Terms of Agreement)
Reply With Quote #1

PHP Code:
public client_putinserver(id)
{
    
set_task0.5"show_terms"id )
}

public 
show_terms(id)
{
    new 
menu menu_create("\rTerms of Agreement^n\y-------------^n\
    \w1. Rule One.^n\
    2. Rule Two.^n\
    3. Rule 3.^n\
    4. Rule 4."
"terms_handler")
    
    
menu_additem(menu"I agree""1"0)
    
menu_additem(menu"I disagree \r(You will be kicked!)""2"0)
    
    
menu_display(idmenu0)
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
}

public 
terms_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
show_terms(id)
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfomenuitemaccessdata6iName63callback )
    
    new 
key str_to_numdata );
    
    switch( 
key )
    {
        case 
1:
        {
            
Weapons_Menu(id);
        }
        
        case 
2:
        {
            
client_print(idprint_console"You have been kicked for denying our Terms of Agreement.")
            
client_cmd(id"toggleconsole")
            
client_cmd(id"disconnect")
        }
    }
    
    return 
PLUGIN_HANDLED;

The only issue I seem to be having is with the handler. The menu shows and what not, but none of the options work (exit, agree, disagree)

I've been trying everything I can to fix it, I suppose everything I have isn't enough. Anything you see wrong here?

Note:

5:46 PM ( I ran the menu on player spawn, and it works completely fine. It only has issues with set_task )
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.

Last edited by GXLZPGX; 07-13-2011 at 17:49.
GXLZPGX 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 01:11.


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