Thread: nVault Tutorial
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-30-2022 , 23:38   Re: nVault Tutorial
Reply With Quote #119

If the intent is to show the menu only if the vault record exists, you'd do:
PHP Code:
@SkinsMenuid )
{
    new 
szData64 ], szID], szVal12 ], iTSiMenu;
        
    if ( 
nvault_lookupg_iVaultg_szSteamIDid ], szVal charsmaxszVal ) , iTS ) )
    {
        
iMenu menu_create"\ySkins Menu:""@SkinsHandler" );
        for( new 
isizeof g_szSkinsDatai++ )
        {
            
formatexszDatacharsmaxszData ), "%s%s \y%i", ( g_PlayerItemsid ] & ITEMS) && iTS >= get_systime( ) ) ? "\d" "\w"g_szSkinsData][ Name ], g_szSkinsData][ Price ] )
            
num_to_striszIDcharsmaxszID ) );
            
menu_additemiMenuszDataszID );
        }
    
        
menu_displayidiMenu )
    }
    return 
PLUGIN_HANDLED;

__________________
Bugsy is offline