Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include < amxmodx >
- #define PLUGIN "Settings Menu ViewCD" // i know it useful/HardCode i just made it for fun.
- #define VERSION "1.0b"
- #define AUTHOR "CheezPuff"
- new Laser[ 33 ], Sounds[ 33 ], Beacon[ 33 ];
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd( "say /menu", "MenuSettings");
- register_clcmd( "chooseteam", "MenuSettings");
- }
- public client_putinserver( Index )
- {
- Sounds[ Index ] = 1;
- Laser[ Index ] = 1;
- Beacon[ Index ] = 1;
- }
- public MenuSettings( Index )
- {
- new szMenu[ 64 ];
- formatex( szMenu, charsmax( szMenu ), "\r[\wViewCD HitAndRun\r] \wSettings Main Menu" );
- new Menu = menu_create( szMenu, "Menu_Sub" );
- formatex(szMenu, charsmax(szMenu), "\ySounds\w: %s", Sounds[ Index ] ? "\rEnable" : "\dDisabled" );
- menu_additem( Menu, szMenu);
- formatex(szMenu, charsmax(szMenu), "\yLaser Shot\w: %s", Laser[ Index ] ? "\rEnable" : "\dDisabled" );
- menu_additem( Menu, szMenu);
- formatex(szMenu, charsmax(szMenu), "\yBeacon\w: %s", Beacon[ Index ] ? "\rEnable" : "\dDisabled" );
- menu_additem( Menu, szMenu);
- menu_display(Index, Menu);
- return PLUGIN_HANDLED;
- }
- public Menu_Sub(Index, Menu, Item)
- {
- menu_destroy( Menu );
- if (Item == MENU_EXIT)
- return;
- switch(Item)
- {
- case 0: Sounds[Index] = !Sounds[Index];
- case 1: Laser[Index] = !Laser[Index];
- case 2: Beacon[Index] = !Beacon[Index];
- }
- MenuSettings( Index );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement