Advertisement
LeXuZ_

GPS

Nov 24th, 2014
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.82 KB | None | 0 0
  1. #define FILTERSCRIPT
  2. #include <a_samp>
  3. #include <zcmd>
  4.  
  5. #define GPS 10
  6. #define GPSLS 11
  7. #define GPSLV 12
  8. #define GPSSF 13
  9.  
  10. CMD:gps(playerid, params[])
  11. {
  12.     if(IsPlayerInAnyVehicle(playerid))
  13.     {
  14.     ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "GPS", "Los Santos\nLas Venturas\nSan Fierro", "Select", "Close");
  15.     return 1;
  16.     }
  17.     GameTextForPlayer(playerid, "~r~You're not in a vehicle", 2000, 1);
  18.     return 1;
  19.   }
  20.  
  21. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  22. {
  23.     if(response)
  24.         {
  25.             switch(dialogid == GPS)
  26.            {
  27.                case 1:
  28.                {
  29.                   switch(listitem)
  30.                  {
  31.                 case 0:
  32.                {
  33.                ShowPlayerDialog(playerid, GPSLS, DIALOG_STYLE_LIST, "Los Santos", "Los Santos police department\n", "Select", "Close");
  34.                }
  35.                case 1:
  36.                {
  37.                ShowPlayerDialog(playerid, GPSLV, DIALOG_STYLE_LIST, "Las Venturas", "Las Venturas police department\n", "Select", "Close");
  38.                }
  39.                case 2:
  40.                {
  41.                ShowPlayerDialog(playerid, GPSSF, DIALOG_STYLE_LIST, "San Fierro", "San Fierro police department\n", "Select", "Close");
  42.                }
  43.            }
  44.         }
  45.       }
  46.     }
  47.     if(dialogid == GPSLS)
  48.     {
  49.         if(!response) return 0;
  50.         {
  51.             switch(listitem)
  52.             {
  53.                 case 0:
  54.                 {
  55.                  SetPlayerCheckpoint(playerid, 1533.1295,-1657.7357,13.3828, 8);
  56.                  GameTextForPlayer(playerid, "~g~Los Santos police department is located on your minimap!", 2000, 1);
  57.                 }
  58.             }
  59.           }
  60.         }
  61.     if(dialogid == GPSLV)
  62.     {
  63.         if(!response) return 0;
  64.         {
  65.             switch(listitem)
  66.             {
  67.                 case 0:
  68.                 {
  69.                  SetPlayerCheckpoint(playerid, 2230.2854,2470.0540,10.8203, 8);
  70.                  GameTextForPlayer(playerid, "~g~Las Venturas police department is located on your minimap!", 2000, 1);
  71.                 }
  72.             }
  73.         }
  74.     }
  75.     if(dialogid == GPSSF)
  76.     {
  77.         if(!response) return 0;
  78.         {
  79.             switch(listitem)
  80.             {
  81.                 case 0:
  82.                 {
  83.                  SetPlayerCheckpoint(playerid, -1563.9243,659.6130,7.0391, 8);
  84.                  GameTextForPlayer(playerid, "~g~San Fierro police department is located on your minimap!", 2000, 1);
  85.                 }
  86.             }
  87.           }
  88.         }
  89.     return 1;
  90. }
  91.  
  92.  
  93. public OnPlayerExitVehicle(playerid, vehicleid)
  94. {
  95.     DisablePlayerCheckpoint(playerid);
  96.     return 1;
  97. }
  98.  
  99. public OnPlayerEnterCheckpoint(playerid)
  100. {
  101.     GameTextForPlayer(playerid, "You have reached your destination", 2000, 1);
  102.     DisablePlayerCheckpoint(playerid);
  103.     return 1;
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement