Advertisement
Guest User

Michelle

a guest
Jun 1st, 2008
846
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.83 KB | None | 0 0
  1. //----------------------------------//
  2. //--- Navigation System Beta 0.1 ---//
  3. //--- Beta 0.1 ---- June 1, 2008 ---//
  4. //------- 2008 Michelle1991 -------//
  5. //----------------------------------//
  6.  
  7.  
  8. #include <a_samp>
  9.  
  10. #define COLOR_ORANGE 0xFF9900FF
  11.  
  12. new Menu:Navigation;
  13. new Menu:LosSantos;
  14. new Menu:SanFiero;
  15. new Menu:LasVenturas;
  16.  
  17. public OnFilterScriptInit()
  18. {
  19.     print("\n--------------------------------------");
  20.     print(" -- Navigation System by Michelle1991 --");
  21.     print("--------------------------------------\n");
  22.     return 1;
  23. }
  24. //==============================================================================
  25. public OnPlayerCommandText(playerid, cmdtext[])
  26. {
  27. if(strcmp(cmdtext, "/navigation", true) == 0)
  28.     {
  29.     ShowMenuForPlayer(Navigation, playerid);
  30.     return 1;
  31.     }
  32. return 0;
  33. }
  34. //==============================================================================
  35. public OnGameModeInit()
  36. {
  37.     Navigation = CreateMenu("Navigation", 1, 50.0, 180.0, 200.0, 200.0);
  38.     SetMenuColumnHeader(Navigation, 0, "Navigation");
  39.     AddMenuItem(Navigation, 0, "Los Santos");
  40.     AddMenuItem(Navigation, 0, "San Fiero");
  41.     AddMenuItem(Navigation, 0, "Las Venturas");
  42. //==============================================================================
  43.     LosSantos = CreateMenu("Los Santos", 1, 50.0, 180.0, 200.0, 200.0);
  44.     SetMenuColumnHeader(LosSantos, 0, "Los Santos");
  45.     AddMenuItem(LosSantos, 0, "Tobi Tower");
  46.     AddMenuItem(LosSantos, 0, "Grove Street");
  47.     AddMenuItem(LosSantos, 0, "Police");
  48.     AddMenuItem(LosSantos, 0, "Vinewood");
  49.     AddMenuItem(LosSantos, 0, "Skatepark");
  50.     AddMenuItem(LosSantos, 0, "Loco Low");
  51.     AddMenuItem(LosSantos, 0, "Airport");
  52.     AddMenuItem(LosSantos, 0, "Exit Menu");
  53. //==============================================================================
  54.     SanFiero = CreateMenu("San Fiero", 1, 50.0, 180.0, 200.0, 200.0);
  55.     SetMenuColumnHeader(SanFiero, 0, "San Fiero");
  56.     AddMenuItem(SanFiero, 0, "Wheel Arch Angels");
  57.     AddMenuItem(SanFiero, 0, "Wang Cars");
  58.     AddMenuItem(SanFiero, 0, "Mount Chiliad");
  59.     AddMenuItem(SanFiero, 0, "Airport");
  60.     AddMenuItem(SanFiero, 0, "Exit Menu");
  61. //==============================================================================
  62.     LasVenturas = CreateMenu("Las Venturas", 1, 50.0, 180.0, 200.0, 200.0);
  63.     SetMenuColumnHeader(LasVenturas, 0, "Las Venturas");
  64.     AddMenuItem(LasVenturas, 0, "Caligulas");
  65.     AddMenuItem(LasVenturas, 0, "4 Dragons");
  66.     AddMenuItem(LasVenturas, 0, "Come-A-Lot");
  67.     AddMenuItem(LasVenturas, 0, "Emerald Isle");
  68.     AddMenuItem(LasVenturas, 0, "Police");
  69.     AddMenuItem(LasVenturas, 0, "Transfender");
  70.     AddMenuItem(LasVenturas, 0, "Airport");
  71.     AddMenuItem(LasVenturas, 0, "Exit Menu");
  72. }
  73. //==============================================================================
  74. public OnPlayerSelectedMenuRow(playerid, row)
  75. {
  76.     new Menu:current;
  77.     current = GetPlayerMenu(playerid);
  78.     if(current == Navigation)
  79.     {
  80.         switch(row)
  81.         {
  82.             case 0:
  83.             {
  84.                 HideMenuForPlayer(Navigation, playerid);
  85.                 ShowMenuForPlayer(LosSantos, playerid);
  86.             }
  87.             case 1:
  88.             {
  89.                 HideMenuForPlayer(Navigation, playerid);
  90.                 ShowMenuForPlayer(SanFiero, playerid);
  91.             }
  92.             case 2:
  93.             {
  94.                 HideMenuForPlayer(Navigation, playerid);
  95.                 ShowMenuForPlayer(LasVenturas, playerid);
  96.             }
  97.         }
  98.     }
  99. //==============================================================================
  100.     if(current == LosSantos)
  101.     {
  102.         switch(row)
  103.         {
  104.             case 0://Tobi Tower
  105.             {
  106.             SetPlayerCheckpoint(playerid,1593.7095,-1314.1335,17.4642,5.0);
  107.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Tobi Tower.");
  108.             }
  109.             case 1://Grove Street
  110.             {
  111.             SetPlayerCheckpoint(playerid,2489.3713,-1667.2455,13.3438,5.0);
  112.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Grove Street.");
  113.             }
  114.             case 2://Police
  115.             {
  116.             SetPlayerCheckpoint(playerid,1533.7186,-1675.6587,13.3828,5.0);
  117.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Police Station.");
  118.             }
  119.             case 3://Vinewood
  120.             {
  121.             SetPlayerCheckpoint(playerid,1241.5826,-734.7064,95.3242,5.0);
  122.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Vinewood Hills.");
  123.             }
  124.             case 4://skatepark
  125.             {
  126.             SetPlayerCheckpoint(playerid,1872.9727,-1383.0305,13.5389,5.0);
  127.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the SkatePark.");
  128.             }
  129.             case 5://Loco Low
  130.             {
  131.             SetPlayerCheckpoint(playerid,2650.6650,-2004.5100,13.3828,5.0);
  132.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Loco Low Tuning Shop.");
  133.             }
  134.             case 6://Airport
  135.             {
  136.             SetPlayerCheckpoint(playerid,1861.3965,-2542.6294,13.5469,5.0);
  137.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Airport.");
  138.             }
  139.             case 7://Exit Menu
  140.             {
  141.             HideMenuForPlayer(LosSantos, playerid);
  142.             }
  143.         }
  144.     }
  145. //==============================================================================
  146.     if(current == SanFiero)
  147.     {
  148.         switch(row)
  149.         {
  150.             case 0://Wheel Arch Angels
  151.             {
  152.             SetPlayerCheckpoint(playerid,-2700.2375,217.3544,4.1797,5.0);
  153.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Wheel Arch Angels Tuning Shop.");
  154.             }
  155.             case 1://Wang Cars
  156.             {
  157.             SetPlayerCheckpoint(playerid,-1987.9504,286.5176,34.3342,5.0);
  158.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Wang Cars Car Shop.");
  159.             }
  160.             case 2://Mount Chiliad
  161.             {
  162.             SetPlayerCheckpoint(playerid,-2388.4858,-2203.0935,33.2891,5.0);
  163.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Mount Chiliad.");
  164.             }
  165.             case 3://Airport
  166.             {
  167.             SetPlayerCheckpoint(playerid,-1653.3717,-160.6955,14.1484,5.0);
  168.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Airport.");
  169.             }
  170.             case 4://Exit Menu
  171.             {
  172.             HideMenuForPlayer(SanFiero, playerid);
  173.             }
  174.         }
  175.     }
  176. //==============================================================================
  177.     if(current == LasVenturas)
  178.     {
  179.         switch(row)
  180.         {
  181.             case 0://Caligulas
  182.             {
  183.             SetPlayerCheckpoint(playerid,2157.4944,1681.5742,10.6953,5.0);
  184.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Caligulas Casino.");
  185.             }
  186.             case 1://4 Dragons
  187.             {
  188.             SetPlayerCheckpoint(playerid,2036.6437,1008.2858,10.8203,5.0);
  189.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the 4 Dragons Casino.");
  190.             }
  191.             case 2://Come-A-Lot
  192.             {
  193.             SetPlayerCheckpoint(playerid,2168.0264,1123.3247,12.5949,5.0);
  194.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Come-A-Lot Hotel.");
  195.             }
  196.             case 3://Emerald Isle
  197.             {
  198.             SetPlayerCheckpoint(playerid,2124.5376,2351.5847,10.6719,5.0);
  199.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Emerald Isle Hotel.");
  200.             }
  201.             case 4://Police
  202.             {
  203.             SetPlayerCheckpoint(playerid,2286.4819,2417.3604,10.7066,5.0);
  204.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Police Station.");
  205.             }
  206.             case 5://Transfender
  207.             {
  208.             SetPlayerCheckpoint(playerid,2386.8870,1026.9823,10.8203,5.0);
  209.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Transfender Tuning Shop.");
  210.             }
  211.             case 6://Airport
  212.             {
  213.             SetPlayerCheckpoint(playerid,1430.0493,1463.0599,10.8203,5.0);
  214.             SendClientMessage(playerid, COLOR_ORANGE, "The Red Marker is at the Airport.");
  215.             }
  216.             case 7://Exit Menu
  217.             {
  218.             HideMenuForPlayer(LasVenturas, playerid);
  219.             }
  220.         }
  221.     }
  222.     return 1;
  223. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement