Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #define MAX_GPS 36
- #define DIALOG_GPS 7986
- enum gInfo
- {
- gName[128],
- Float:gX,
- Float:gY,
- Float:gZ
- }
- new GPSInfo[MAX_GPS][gInfo];
- new GPS = 0;
- new gpsstr[256];
- new GPS_Activated[MAX_PLAYERS] = 0;
- stock AddGPS(name[], Float:x, Float:y, Float:z)
- {
- GPS++;
- format(GPSInfo[GPS][gName],256,"%s",name);
- GPSInfo[GPS][gX] = x;
- GPSInfo[GPS][gY] = y;
- GPSInfo[GPS][gZ] = z;
- return 1;
- }
- public OnFilterScriptInit()
- {
- print(" [][]> GPS System by dock LOADED!");
- AddGPS("Burger Shot", 1174.7587,-905.0877,43.0052);
- AddGPS("Los Santos PD", 1523.4817,-1681.0198,13.2347);
- for(new i = 0; i < GPS+1; i++)
- {
- if(i != 0)
- {
- if(i == 1) format(gpsstr,256,"%s\n",GPSInfo[i][gName]);
- if(i != 1) format(gpsstr,256,"%s%s\n",gpsstr,GPSInfo[i][gName]);
- }
- }
- return 1;
- }
- CMD:gps(playerid,params[])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xff0000aa, " [GPS] You are not in a vehicle!");
- ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, " GPS:", gpsstr, "Choose", "Cancel");
- return 1;
- }
- CMD:gpsoff(playerid,params[])
- {
- if(GPS_Activated[playerid] == 1)
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, 0xffff00aa, " [GPS] You turned your GPS off!");
- GPS_Activated[playerid] = 0;
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GPS_Activated[playerid] == 1)
- {
- SendClientMessage(playerid, 0xffff00aa, " [GPS] You have arrived at your destenation!");
- DisablePlayerCheckpoint(playerid);
- GPS_Activated[playerid] = 0;
- }
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_GPS)
- {
- if(!response) return 1;
- if(listitem == GPS+1) return 1;
- SetPlayerCheckpoint(playerid, GPSInfo[listitem+1][gX], GPSInfo[listitem+1][gY], GPSInfo[listitem+1][gZ],5.0);
- GPS_Activated[playerid] = 1;
- return 1;
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public OnEnterExitModShop(playerid,enterexit,interiorid)
- {
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
- {
- return 1;
- }
- public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
- {
- return 1;
- }
- public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
- {
- return 1;
- }
- public OnVehicleDamageStatusUpdate(vehicleid, playerid)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment