RockTheStreet ,jbe_core.sma
13 Фев 2022
Show_WeaponsGuardMenu(id)
{
if(g_iDayMode != 1 && g_iDayMode != 2 || IsNotSetBit(g_iBitUserAlive, id)) return PLUGIN_HANDLED;
new szMenu[512], iKeys = (1<<0|1<<1|1<<2|1<<9), iLen = formatex(szMenu, charsmax(szMenu), "\w%L^n^n", id, "JBE_MENU_WEAPONS_GUARD_TITLE");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[1] \w%L^n", id, "JBE_MENU_WEAPONS_GUARD_AK47");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[2] \w%L^n", id, "JBE_MENU_WEAPONS_GUARD_M4A1");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[3] \w%L^n^n", id, "JBE_MENU_WEAPONS_GUARD_XM1014");
if(IsSetBit(g_iBitUserVip, id))
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[4] \w%L^n", id, "JBE_MENU_WEAPONS_GUARD_AKKNIFE");
iKeys |= (1<<3);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[#] \d%L^n", id, "JBE_MENU_WEAPONS_GUARD_AKKNIFE");
if(IsSetBit(g_iBitUserElite, id))
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[5] \w%L^n", id, "JBE_MENU_WEAPONS_GUARD_SKULL");
iKeys |= (1<<4);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[#] \d%L^n", id, "JBE_MENU_WEAPONS_GUARD_SKULL");
if(IsSetBit(g_iBitUserDemon, id))
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[6] \w%L^n", id, "JBE_MENU_WEAPONS_GUARD_AKS");
iKeys |= (1<<5);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r[#] \d%L^n", id, "JBE_MENU_WEAPONS_GUARD_AKS");
formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r[0] \w%L", id, "JBE_MENU_EXIT");
return show_menu(id, iKeys, szMenu, -1, "Show_WeaponsGuardMenu");
}
13 Фев 2022
public open_menu ( id )
{
new szCaption [ 255 ], szTemp [ 10 ], menu
format ( szCaption, charsmax ( szCaption ), "\d[ Sneezy1 ]^n\rТест охраны \d[ %d / %d ]^n\y%s", UserData [ id ][ issue ], sizeof ( questions ), questions [ UserData [ id ][ issue ] ] )
menu = menu_create ( szCaption, "func_omenu" )
for ( new i; i < coint_answers [ UserData [ id ][ issue ] ]; i++ )
{
num_to_str ( i, szTemp, charsmax ( szTemp ) )
menu_additem ( menu, answers [ UserData [ id ][ issue ] ][ i ], szTemp, 0 )
}
menu_setprop ( menu, MPROP_BACKNAME, "Назад" )
menu_setprop ( menu, MPROP_NEXTNAME, "Далее" )
menu_setprop ( menu, MPROP_EXITNAME, "Выход" )
menu_display ( id, menu, 0 )
return PLUGIN_HANDLED
}