AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help for vipmenu button to next page... (https://forums.alliedmods.net/showthread.php?t=162057)

saionaara 07-14-2011 09:36

Need help for vipmenu button to next page...
 
Hello, i have custom vipmenu for admins and vips... now i added fiew more models for admins to use but now i have over 10 of them... how to split the menu and put some of them to next page... ? how to create this kind of thing into the script ?
The thing why i need to split the menu is cuz button 9 has to be button "back" and 0 is "exit" thats why...

Part of the script where skins are defined...

Code:

show_menu_engskin2(id)
{
    static menu2[250], len2
    len2 = 0
   
    // Title
    len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\y%L^n^n", id, "MENU_SKIN00")

    // 1. Skin - 01
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r1.\w %L^n", id, "MENU_SKIN01")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d1. %L^n", id, "MENU_SKIN01")

    // 2. Skin - 02
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r2.\w %L^n", id, "MENU_SKIN02")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d2. %L^n", id, "MENU_SKIN02")

    // 3. Skin - 03
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r3.\w %L^n", id, "MENU_SKIN03")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d3. %L^n", id, "MENU_SKIN03")

    // 4. Skin - 04
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r4.\w %L^n", id, "MENU_SKIN04")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d4. %L^n", id, "MENU_SKIN04")

    // 5. Skin - 05
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r5.\w %L^n", id, "MENU_SKIN05")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d5. %L^n", id, "MENU_SKIN05")

    // 6. Skin - 06
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r6.\w %L^n", id, "MENU_SKIN06")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d6. %L^n", id, "MENU_SKIN06")

    // 7. Skin - 07
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r7.\w %L^n", id, "MENU_SKIN07")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d7. %L^n", id, "MENU_SKIN07")

    // 8. Skin - 08
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r8.\w %L^n", id, "MENU_SKIN08")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d8. %L^n", id, "MENU_SKIN08")

    // 9. Skin - 09
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r9.\w %L^n", id, "MENU_SKIN09")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d9. %L^n", id, "MENU_SKIN09")

    // 10. Skin - 10
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r10.\w %L^n^n", id, "MENU_SKIN10")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d10. %L^n^n", id, "MENU_SKIN10")

       
    // 11. Reset Skin
    if (get_user_flags(id) & ACCESSMENU)
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\r11.\w %L^n", id, "MENU_SKIN11")
    else
        len2 += formatex(menu2[len2], charsmax(menu2) - len2, "\d11. %L^n", id, "MENU_SKIN11")

    // 12. back
    len2 += formatex(menu2[len2], charsmax(menu2) - len2, "^n^n\r12.\w %L^n", id, "MENU_BACK2")

   
    // 0. Exit
    len2 += formatex(menu2[len2], charsmax(menu2) - len2, "^n^n\r0.\w %L", id, "MENU_EXIT2")
   
    show_menu(id, KEYSMENU, menu2, -1, "engSkin2Menu")
}


Exolent[jNr] 07-14-2011 09:45

Re: Need help for vipmenu button to next page...
 
You can't have more than 10 items in a menu.
Use the first 7 for your skins, then the last 3 for next, back, and exit.

saionaara 07-15-2011 03:33

Re: Need help for vipmenu button to next page...
 
well how to add "next" button ? i dont know how to do it... and also how to add these last 3 to next page ?

Exolent[jNr] 07-15-2011 09:17

Re: Need help for vipmenu button to next page...
 
Then use the new menu system and it will paginate for you.
https://forums.alliedmods.net/showthread.php?t=46364


All times are GMT -4. The time now is 00:57.

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