Здравствуйте, прошу помощи, так как сам не смогу. Хочу разделить голд оружие по флагам доступа. С соответствующими настройками...
Реально ли добавить в эту часть кода такую проверку?
// Custom Menu
public MenuCommandCustom(id)
{
new szMenu[512] // it is maximum allowed menu size
new iKeys
new usermoney = fm_get_user_money(id)
new iLen = formatex( szMenu, charsmax(szMenu), "\y%L\R$^t^t%L^t^n^n", LANG_SERVER,"BUY_MENU", LANG_SERVER,"COST")
new iItemsDisabled
if( !( get_user_flags(id) & buyaccess) || !g_iAlive[id] /*|| CheckFlag( gbIsUsed, id )*/)
iItemsDisabled = 1
if( iItemsDisabled || g_iDGLPluginId < 0 )
{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\r1.^t%L^t^n", LANG_SERVER,"CUSTOM_DEAGLE")
}else if( iItemsDisabled || usermoney < dglcost ){
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\d1.^t%L\R\r%d^t^n", LANG_SERVER,"CUSTOM_DEAGLE", dglcost)
}else{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\y1.^t\w%L\R\y%d^t^n", LANG_SERVER,"CUSTOM_DEAGLE", dglcost)
iKeys |= MENU_KEY_1
}
if( iItemsDisabled || g_iM4A1PluginId < 0 )
{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\r2.^t%L^t^n", LANG_SERVER,"CUSTOM_M4A1")
}else if( iItemsDisabled || usermoney < m4cost){
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\d2.^t%L\R\r%d^t^n", LANG_SERVER,"CUSTOM_M4A1", m4cost)
}else{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\y2.^t\w%L\R\y%d^t^n", LANG_SERVER,"CUSTOM_M4A1", m4cost)
iKeys |= MENU_KEY_2
}
if( iItemsDisabled || g_iAK47PluginId < 0 )
{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\r3.^t%L^t^n", LANG_SERVER, "CUSTOM_AK-47")
}else if( iItemsDisabled || usermoney < akcost){
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\d3.^t%L\R\r%d^t^n", LANG_SERVER, "CUSTOM_AK-47", akcost)
}else{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\y3.^t\w%L\R\y%d^t^n", LANG_SERVER, "CUSTOM_AK-47", akcost)
iKeys |= MENU_KEY_3
}
if( iItemsDisabled || g_iAWPPluginId < 0 )
{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\r4.^t%L^t^n", LANG_SERVER, "CUSTOM_AWP")
}else if( iItemsDisabled || usermoney < awpcost){
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\d4.^t%L\R\r%d^t^n", LANG_SERVER, "CUSTOM_AWP", awpcost)
}else{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\y4.^t\w%L\R\y%d^t^n", LANG_SERVER, "CUSTOM_AWP", awpcost)
iKeys |= MENU_KEY_4
}
public MenuCommandCustom(id)
{
new szMenu[512] // it is maximum allowed menu size
new iKeys
new usermoney = fm_get_user_money(id)
new iLen = formatex( szMenu, charsmax(szMenu), "\y%L\R$^t^t%L^t^n^n", LANG_SERVER,"BUY_MENU", LANG_SERVER,"COST")
new iItemsDisabled
if( !( get_user_flags(id) & buyaccess) || !g_iAlive[id] /*|| CheckFlag( gbIsUsed, id )*/)
iItemsDisabled = 1
if( iItemsDisabled || g_iDGLPluginId < 0 )
{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\r1.^t%L^t^n", LANG_SERVER,"CUSTOM_DEAGLE")
}else if( iItemsDisabled || usermoney < dglcost ){
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\d1.^t%L\R\r%d^t^n", LANG_SERVER,"CUSTOM_DEAGLE", dglcost)
}else{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\y1.^t\w%L\R\y%d^t^n", LANG_SERVER,"CUSTOM_DEAGLE", dglcost)
iKeys |= MENU_KEY_1
}
if( iItemsDisabled || g_iM4A1PluginId < 0 )
{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\r2.^t%L^t^n", LANG_SERVER,"CUSTOM_M4A1")
}else if( iItemsDisabled || usermoney < m4cost){
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\d2.^t%L\R\r%d^t^n", LANG_SERVER,"CUSTOM_M4A1", m4cost)
}else{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\y2.^t\w%L\R\y%d^t^n", LANG_SERVER,"CUSTOM_M4A1", m4cost)
iKeys |= MENU_KEY_2
}
if( iItemsDisabled || g_iAK47PluginId < 0 )
{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\r3.^t%L^t^n", LANG_SERVER, "CUSTOM_AK-47")
}else if( iItemsDisabled || usermoney < akcost){
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\d3.^t%L\R\r%d^t^n", LANG_SERVER, "CUSTOM_AK-47", akcost)
}else{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\y3.^t\w%L\R\y%d^t^n", LANG_SERVER, "CUSTOM_AK-47", akcost)
iKeys |= MENU_KEY_3
}
if( iItemsDisabled || g_iAWPPluginId < 0 )
{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\r4.^t%L^t^n", LANG_SERVER, "CUSTOM_AWP")
}else if( iItemsDisabled || usermoney < awpcost){
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\d4.^t%L\R\r%d^t^n", LANG_SERVER, "CUSTOM_AWP", awpcost)
}else{
iLen += formatex( szMenu[iLen], charsmax(szMenu) - iLen, "\y4.^t\w%L\R\y%d^t^n", LANG_SERVER, "CUSTOM_AWP", awpcost)
iKeys |= MENU_KEY_4
}