Raised This Month: $ Target: $400
 0% 

Open menu after join server probem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
J4CK
Member
Join Date: Dec 2008
Location: India
Old 01-01-2010 , 18:49   Open menu after join server probem
Reply With Quote #1

i have problem
when player connect, menu auto-open, its ok...

but when connect next player! menu open again on all player who on the server how to fix it?

it my code on (auto-open-menu)

PHP Code:
public client_putinserver(id) { 
    
set_task(3.0"cmdconnectmenuopen"

public 
cmdconnectmenuopen(id) { 
    
client_cmd(id"say /menu"); 

PHP Code:
#include <amxmodx>

#define PLUGIN    "menu_test"
#define AUTHOR    "menu_test"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_clcmd("say /menu""TestConnectMenu")
    
}

public 
client_putinserver(id) {
    
set_task(3.0"cmdconnectmenuopen")
}
public 
cmdconnectmenuopen(id) {
    
client_cmd(id"say /menu");
}

public 
TestConnectMenu(id)
{
    new 
Menu menu_create("\yClimbers Menu""test_show")
    
    
menu_additem(Menu"\wSAY hi (test)""1"0)
    
    
menu_setprop(Menu,MPROP_EXITNAME,"Exit")
    
menu_setprop(MenuMPROP_EXITMEXIT_ALL)
    
    
menu_display(idMenu0)
    
    return 
PLUGIN_HANDLED
}

public 
test_show(idMenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(Menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
iData[6]
    new 
iAccess
    
new iCallback
    
new iName[64]
    
    
menu_item_getinfo(MenuitemiAccessiData5iName63iCallback)
    
    switch(
str_to_num(iData))
    {
        case 
1:
        {
            
client_cmd(id"say test-hi-123");
            
TestConnectMenu(id)
        }

    }
    return 
PLUGIN_HANDLED

J4CK 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 04:12.


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