не заблокировалось меню покупок

Сообщения
14
Реакции
-1
Не могу понять , чекал другие менюшки также
Код:
#include <amxmodx>
#include <hamsandwich>

new Array:getWeaponName
new Array:getWeaponType

new g_fwItemSelected;
new g_iForwardResult;

new getListBlockedCommandBuy[][]=
{
    "usp", "glock", "deagle", "p228", "elites",
    "fn57", "m3", "xm1014", "mp5", "tmp", "p90",
    "mac10", "ump45", "ak47", "galil", "famas",
    "sg552", "m4a1", "aug", "scout", "awp", "g3sg1",
    "sg550", "m249", "vest", "vesthelm", "flash",
    "hegren", "sgren", "defuser", "nvgs", "shield",
    "primammo", "secammo", "km45", "9x19mm", "nighthawk",
    "228compact", "fiveseven", "12gauge", "autoshotgun",
    "mp", "c90", "cv47", "defender", "clarion", "krieg552",
    "bullpup", "magnum", "d3au1", "krieg550",
    "buy", "buyequip", "cl_autobuy",
    "cl_rebuy", "cl_setautobuy", "cl_setrebuy", "client_buy_open"
}

enum
{
    primaryMenu = 0,
    secondaryMenu
}

new g_iMsgID_BuyClose, g_iMsgID_StatusIcon;

public plugin_init()
{
    g_iMsgID_BuyClose = get_user_msgid( "BuyClose" );
    g_iMsgID_StatusIcon = get_user_msgid( "StatusIcon" );
   
    g_fwItemSelected = CreateMultiForward("sel", ET_CONTINUE, FP_CELL, FP_CELL);
   
    new createBuyCommands
    for(createBuyCommands = 0; createBuyCommands < sizeof getListBlockedCommandBuy; createBuyCommands++)
        register_clcmd(getListBlockedCommandBuy[createBuyCommands], "getMenuPlayer")  
   
}
public plugin_precache()
{
    getWeaponName = ArrayCreate(32, 1)
    getWeaponType = ArrayCreate(1, 1);

}
public plugin_natives() register_native( "registerItem", "nativeRegisterItem", 1 );
public getMenuPlayer(iUser, typeMenu)
{
    if(!is_user_alive(iUser))
        return;
   
    message_begin( MSG_ONE, g_iMsgID_BuyClose, _, iUser );
    message_end( );

   
    new createMenu, typeWeapon
    new getInfoWeapon[64], longLine[2048]
    new iWeaponIndex[3]
   
    new getNumberItem = ArraySize(getWeaponName)
    if(!getNumberItem)
    {
        client_print(iUser, print_chat, "NO ITEM")
    }
   
    switch(typeWeapon)
    {
        case primaryMenu: formatex( longLine, charsmax( longLine ), "Primary")
        case secondaryMenu: formatex( longLine, charsmax( longLine ), "Secondary")
    }
   
    createMenu = menu_create(longLine, "subTaskMenu")
   
    for( new i = 0; i < ArraySize(getWeaponName ); i++ )
    {
        ArrayGetString(getWeaponName, i, getInfoWeapon, charsmax (getInfoWeapon))
        typeWeapon = ArrayGetCell(getWeaponType, i)
       
        if(typeWeapon == typeMenu)
        {
            formatex(longLine, charsmax(longLine), "%s", getInfoWeapon)
           
            num_to_str( i, iWeaponIndex, charsmax( iWeaponIndex ) )
            menu_additem( createMenu, longLine, iWeaponIndex, _, -1 )
        }
    }
   
    menu_setprop(createMenu, MPROP_EXITNAME, "Exit" );
   
    menu_display(iUser, createMenu, 0)
   
}
public subTaskMenu(iUser)
{
    new iWeaponID

    ExecuteForward( g_fwItemSelected, g_iForwardResult, iUser, iWeaponID )
     return PLUGIN_HANDLED

   
}
public nativeRegisterItem( const getInfoWeapon[ ], typeWeapon)
{
    param_convert( 1 );
   
    ArrayPushString( getWeaponName, getInfoWeapon );
    ArrayPushCell( getWeaponType, typeWeapon );
   
    return ArraySize( getWeaponName ) -1;
}
stock UTIL_StatusIcon( iPlayer, iStatus, szIcon[], iRed, iGreen, iBlue )
{
    message_begin( MSG_ONE, g_iMsgID_StatusIcon, _, iPlayer );
    write_byte( iStatus );
    write_string( szIcon );
    write_byte( iRed );
    write_byte( iGreen );
    write_byte( iBlue );
    message_end( );
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
 

Вложения

Сообщения
3,051
Реакции
1,739
Помог
80 раз(а)
Не видно попыток - дорога в раздел "покупка"
 
Сообщения
2,288
Реакции
1,740
Помог
31 раз(а)
mrnomore, В теме должны быть опубликованы попытки (diff кода или последовательность действий) самостоятельного поиска решения.
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу