AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   i cant close my menu oO (https://forums.alliedmods.net/showthread.php?t=100647)

One 08-16-2009 14:16

i cant close my menu oO
 
PHP Code:

register_menucmd(register_menuid("welcome_menu"),1023,"welcome_menu_handler");

public 
show_welcome(id)
{
    if(
g_welcomed[id]) return;
    new 
menuidkeys;
    
get_user_menu(id,menuid,keys);

    if(
menuid 0)
    {
        
set_task(3.0,"show_welcome",id);
        return;
    }
    new 
menuText[512];
    new 
len formatex(menuText,511,"\rRally Mod 1.3 \dby \rOne^n",id );
    
len += formatex(menuText[len],511-len,"\w----------------------------------------^n",id );
    new 
special;
    
len += formatex(menuText[len],511-len,"\w----------------------------------------^n",id );
    
special 1;
    
len += formatex(menuText[len],511-len,"\wSay \r/menu \wto entere the \rMain-Menu^n",id );
    
special 1;
    
len += formatex(menuText[len],511-len,"\wSay \r/help \wif you need help^n",id );
    
special 1;
    
    if(
speciallen += formatex(menuText[len],511-len,"\w----------------------------------------^n",id );
    
len += formatex(menuText[len],511-len,"\wVisits us @ www.hardstyle-esports.de^n",id);
    
len += formatex(menuText[len],511-len,"\wOur wiki @ www.hardstyle-esports.de/wiki/^n");
    
len += formatex(menuText[len],511-len,"Contact @ [email protected]^n",id);

    
show_menu(id,1023,menuText,-1,"welcome_menu");

public 
welcome_menu_handler(id,key)
{
    
// just save g_welcomed status and let menu close
    
g_welcomed[id] = 1;
    return 
PLUGIN_HANDLED;
}


public 
Event_ResetHUDid 
{
    
gPlayerAlive[id] = is_user_aliveid );
    
HudApplyCVars()
    new 
iHideFlags GetHudHideFlags()
    if(
iHideFlags)
    {
        
message_begin(MSG_ONEg_msgHideWeapon_id)
        
write_byte(iHideFlags)
        
message_end()
    }    
    if(
firstspawn[id])
    {
        
show_welcome(id);
    }
    
firstspawn[id] = false;




All times are GMT -4. The time now is 14:58.

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