Advertisement
Guest User

Fallout

a guest
Feb 14th, 2009
1,110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.16 KB | None | 0 0
  1.                         //////////////////////
  2.                         ////New Menu Styles///
  3.                         //////Created by://///
  4.                         //////°Fallout°///////
  5.                         //////////////////////
  6.  
  7. #include <a_samp>
  8. #include <F_Menu>
  9.  
  10. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  11.  
  12. new Example1;
  13. new Example2;
  14. new Example3;
  15. new Example4;
  16.  
  17. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  18.  
  19. public OnFilterScriptInit()
  20. {
  21.     Example1 = F_CreateMenu("Example1", 20.0, 120.0, 200.0);
  22.     F_AddMenuItem(Example1, "Item1");
  23.     F_AddMenuItem(Example1, "Item2");
  24.     F_AddMenuItem(Example1, "Item3");
  25.  
  26.     Example2 = F_CreateMenu("Example2", 20.0, 120.0, 200.0);
  27.     F_AddMenuItem(Example2, "Item1");
  28.     F_AddMenuItem(Example2, "Item2");
  29.     F_AddMenuItem(Example2, "Item3");
  30.     F_AddMenuItem(Example2, "Item4");
  31.     F_SetMenuTitleBoxColor(Example2, 0xCC000099);
  32.     F_SetMenuSelectedItemBoxColor(Example2, 0xFF000099);
  33.  
  34.     Example3 = F_CreateMenu("Example3", 100.0, 130.0, 400.0);
  35.     F_AddMenuItem(Example3, "Item1");
  36.     F_AddMenuItem(Example3, "Item2");
  37.     F_AddMenuItem(Example3, "Item3");
  38.     F_AddMenuItem(Example3, "Item4");
  39.     F_AddMenuItem(Example3, "Item5");
  40.     F_SetMenuTitleBgColor(Example3, 0x33FF0099);
  41.     F_SetMenuSelectedItemBgColor(Example3, 0x00CC0099);
  42.  
  43.     Example4 = F_CreateMenu("Example4", 50.0, 120.0, 300.0);
  44.     F_AddMenuItem(Example4, "Item1");
  45.     F_AddMenuItem(Example4, "Item2");
  46.     F_AddMenuItem(Example4, "Item3");
  47.     F_AddMenuItem(Example4, "Item4");
  48.     F_AddMenuItem(Example4, "Item5");
  49.     F_AddMenuItem(Example4, "Item6");
  50.     F_SetMenuTitleBoxColor(Example4, 0x00009999);
  51.     F_SetMenuItemBoxColor(Example4, 0x0000CC99);
  52.     F_SetMenuSelectedItemBoxColor(Example4, 0x0000FF99);
  53.     F_SetMenuTitleBgColor(Example4, 0xFFFFFF99);
  54.     F_SetMenuItemBgColor(Example4, 0xFFFFFF99);
  55.     F_SetMenuSelectedItemBgColor(Example4, 0xFFFFFF99);
  56.     F_SetMenuTitleTextColor(Example4, 0x00000099);
  57.     F_SetMenuItemTextColor(Example4, 0x00000099);
  58.     F_SetMenuSelectedItemTextColor(Example4, 0x00000099);
  59. }
  60.  
  61. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  62.  
  63. public F_OnPlayerSelectedMenuRow(playerid, menuid, row)
  64. {
  65.     if(menuid == Example1)
  66.     {
  67.         switch(row)
  68.         {
  69.             case 0:
  70.             {
  71.                 F_ShowMenuForPlayer(Example2, playerid);
  72.                 TogglePlayerControllable(playerid, true);
  73.             }
  74.             case 1:
  75.             {
  76.                 F_ShowMenuForPlayer(Example3, playerid);
  77.                 TogglePlayerControllable(playerid, true);
  78.             }
  79.             case 2:
  80.             {
  81.                 F_ShowMenuForPlayer(Example4, playerid);
  82.                 TogglePlayerControllable(playerid, true);
  83.             }
  84.         }
  85.     }
  86. }
  87.  
  88. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  89.  
  90. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  91. {
  92.     F_OnPlayerKeyStateChange(playerid, newkeys);
  93.     return 1;
  94. }
  95.  
  96. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  97.  
  98. public F_OnPlayerExitedMenu(playerid, menuid)
  99. {
  100.     TogglePlayerControllable(playerid, true);
  101. }
  102.  
  103. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  104.  
  105. public OnPlayerCommandText(playerid, cmdtext[])
  106. {
  107.     if(!strcmp(cmdtext,"/Example1", true))
  108.     {
  109.         F_ShowMenuForPlayer(Example1, playerid);
  110.         TogglePlayerControllable(playerid, false);
  111.         return 1;
  112.     }
  113.  
  114.     if(!strcmp(cmdtext,"/Example2", true))
  115.     {
  116.         F_ShowMenuForPlayer(Example2, playerid);
  117.         TogglePlayerControllable(playerid, false);
  118.         return 1;
  119.     }
  120.  
  121.     if(!strcmp(cmdtext,"/Example3", true))
  122.     {
  123.         F_ShowMenuForPlayer(Example3, playerid);
  124.         TogglePlayerControllable(playerid, false);
  125.         return 1;
  126.     }
  127.  
  128.     if(!strcmp(cmdtext,"/Example4", true))
  129.     {
  130.         F_ShowMenuForPlayer(Example4, playerid);
  131.         TogglePlayerControllable(playerid, false);
  132.         return 1;
  133.     }
  134.     return 0;
  135. }
  136.  
  137. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  138.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement