Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #define GPS 10
- #define GPSLS 11
- #define GPSLV 12
- #define GPSSF 13
- CMD:gps(playerid, params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "GPS", "Los Santos\nLas Venturas\nSan Fierro", "Select", "Close");
- return 1;
- }
- GameTextForPlayer(playerid, "~r~You're not in a vehicle", 2000, 1);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(response)
- {
- switch(dialogid == GPS)
- {
- case 1:
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, GPSLS, DIALOG_STYLE_LIST, "Los Santos", "Los Santos police department\n", "Select", "Close");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, GPSLV, DIALOG_STYLE_LIST, "Las Venturas", "Las Venturas police department\n", "Select", "Close");
- }
- case 2:
- {
- ShowPlayerDialog(playerid, GPSSF, DIALOG_STYLE_LIST, "San Fierro", "San Fierro police department\n", "Select", "Close");
- }
- }
- }
- }
- }
- if(dialogid == GPSLS)
- {
- if(!response) return 0;
- {
- switch(listitem)
- {
- case 0:
- {
- SetPlayerCheckpoint(playerid, 1533.1295,-1657.7357,13.3828, 8);
- GameTextForPlayer(playerid, "~g~Los Santos police department is located on your minimap!", 2000, 1);
- }
- }
- }
- }
- if(dialogid == GPSLV)
- {
- if(!response) return 0;
- {
- switch(listitem)
- {
- case 0:
- {
- SetPlayerCheckpoint(playerid, 2230.2854,2470.0540,10.8203, 8);
- GameTextForPlayer(playerid, "~g~Las Venturas police department is located on your minimap!", 2000, 1);
- }
- }
- }
- }
- if(dialogid == GPSSF)
- {
- if(!response) return 0;
- {
- switch(listitem)
- {
- case 0:
- {
- SetPlayerCheckpoint(playerid, -1563.9243,659.6130,7.0391, 8);
- GameTextForPlayer(playerid, "~g~San Fierro police department is located on your minimap!", 2000, 1);
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- GameTextForPlayer(playerid, "You have reached your destination", 2000, 1);
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement