ItsMods

Full Version: [Contest] Scroll Menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
- WHATS THIS?! -

Just watch this and you know what it does:



- HOW TO EDIT -
its very easy to edit and customize to your own likings. at the top of the scroll_menu.gsc you will find this:
C++ Code
  1. init()
  2. {
  3. // Precache the custom menu
  4. precacheMenu( "weapon_scroll" );
  5.  
  6. // Skip team and class selection
  7. setDvar( "scr_disable_cac", 1 );
  8. setDvar( "g_allow_teamchange", 0 );
  9.  
  10. // setup scrollmenu vars
  11. level.sm = [];
  12. level.sm[ "scrollspeed" ] = 0.2;
  13. level.addOption = ::add_option;
  14. level.menuAction = ::menu_action;
  15.  
  16. // Settings .. DO NOT CHANGE! Only if you think the sizes and transparancy of the images are not good
  17. add_menuSetting( "-3", 0.00, 10, 5, -500 );
  18. add_menuSetting( "-2", 0.50, 60, 30, -300 );
  19. add_menuSetting( "-1", 0.75, 120, 60, -200 );
  20. add_menuSetting( "0", 1.00, 200, 100, 0 );
  21. add_menuSetting( "1", 0.75, 120, 60, 200 );
  22. add_menuSetting( "2", 0.50, 60, 30, 300 );
  23. add_menuSetting( "3", 0.00, 10, 5, 500 );
  24.  
  25. // Weapons .. Add as much things as you want
  26. [[level.addOption]]( "famas_mp", "menu_mp_weapons_famas", "FAMAS" );
  27. [[level.addOption]]( "m16_mp", "menu_mp_weapons_m16", "M16A1" );
  28. [[level.addOption]]( "l96a1_mp", "menu_mp_weapons_l96a1", "L96A1" );
  29. [[level.addOption]]( "ak47_mp", "menu_mp_weapons_ak47", "AK47" );
  30. [[level.addOption]]( "ak74u_mp", "menu_mp_weapons_ak74u", "AK74u" );
  31. [[level.addOption]]( "spas_mp", "menu_mp_weapons_spas", "SPAS-12" );
  32. [[level.addOption]]( "crossbow_explosive_mp","menu_mp_weapons_crossbow", "Crossbow" );
  33. [[level.addOption]]( "fnfal_mp", "menu_mp_weapons_fnfal", "FN FAL" );
  34. [[level.addOption]]( "m60_mp", "menu_mp_weapons_m60", "M60" );
  35. [[level.addOption]]( "spectre_mp", "menu_mp_weapons_spectre", "Spectre" );
  36. [[level.addOption]]( "mpl_mp", "menu_mp_weapons_mpl", "MPL" );
  37. [[level.addOption]]( "rpg_mp", "menu_mp_weapons_rpg", "RPG-7" );
  38. [[level.addOption]]( "commando_mp", "menu_mp_weapons_commando", "Commando" );
  39.  
  40. thread onPlayerConnected();
  41. }


You can add options with
Code:
[[level.addOption]]( "VARIABLE WHEN CLICKED", "IMAGE TO DISPLAY", "NAME TO DISPLAY" );

Adding options can be done in any gsc file for people who like things organized (like me Big Grin)

you can also change the function that will be executed when someone clicks start:
Code:
level.menuAction = ::YOUR_FUNCTION_NAME;

the default function is:
C++ Code
  1. menu_action( thing )
  2. {
  3. self takeAllWeapons();
  4. self giveWeapon( thing );
  5. self giveWeapon( "knife_mp" );
  6. self giveWeapon( "m1911_mp" );
  7. self switchToWeapon( thing );
  8. }


"thing" will be the thing you filled in @ "VARIABLE WHEN CLICKED" in the option that is selected. The function can be located in any gsc file, just make sure you define level.menuAction right.

also,

DO NOT CHANGE THE "add_menuSetting" STUFF ON INIT

- OTHER -

I added 2 dvars at the top of the scroll_menu.gsc to skip the teamselection (auto-assign) and class menu .. but you can remove this and open the menu whenever you want (just look tru the menu and remove self openMenu() etc)

You can select the gun with both the arrow KEYS and the arrow BUTTONS in the menu itsself

- DOWNLOAD -
MODFILE
[attachment=1082]

SOURCE
[attachment=1080]
sick release
improves every mod!
Nice!
this is EPIC!
Woeps uploaded the menu with a bug.. download the new one or all the images will be very small @ first open Big Grin
very nice! good job dude Awesome
Thats freaking amazing o.O
Awesome work @iAegle.Superman
iAegle is the master of the menu's
Pages: 1 2 3 4 5