Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define CPZCMD
- //#define CPYCMD
- //#define CPSTRCMP
- #include <a_samp>
- #if defined CPZCMD
- #include <zcmd>
- #endif
- #if defined CPYCMD
- #include <YSI\y_commands>
- #endif
- #define MAX_GPS 36
- #define DIALOG_GPS 7986
- enum gInfo
- {
- gIme[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(ime[], Float:x, Float:y, Float:z)
- {
- GPS++;
- format(GPSInfo[GPS][gIme],256,"%s",ime);
- GPSInfo[GPS][gX] = x;
- GPSInfo[GPS][gY] = y;
- GPSInfo[GPS][gZ] = z;
- return 1;
- }
- public OnFilterScriptInit()
- {
- print(" [][]> GPS System by dock LOADED!");
- AddGPS("Burg", 1174.7587,-905.0877,43.0052);
- AddGPS("Banka", 1461.9059,-1044.3109,23.5162);
- AddGPS("LSPD", 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][gIme]);
- if(i != 1) format(gpsstr,256,"%s%s\n",gpsstr,GPSInfo[i][gIme]);
- }
- }
- return 1;
- }
- #if defined CPZCMD
- CMD:gps(playerid,params[])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xff0000aa, " [GPS] Niste u vozilu!");
- ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, " GPS:", gpsstr, "Izaberi", "Odustani");
- return 1;
- }
- CMD:gpsoff(playerid,params[])
- {
- if(GPS_Activated[playerid] == 1)
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, 0xffff00aa, " [GPS] Iskljucili ste GPS!");
- GPS_Activated[playerid] = 0;
- }
- return 1;
- }
- #endif
- #if defined CPYCMD
- YCMD:gps(playerid,params[],help)
- {
- #pragma unused help
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xff0000aa, " [GPS] Niste u vozilu!");
- ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, " GPS:", gpsstr, "Izaberi", "Odustani");
- return 1;
- }
- YCMD:gpsoff(playerid,params[],help)
- {
- #pragma unused help
- if(GPS_Activated[playerid] == 1)
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, 0xffff00aa, " [GPS] Iskljucili ste GPS!");
- GPS_Activated[playerid] = 0;
- }
- return 1;
- }
- #endif
- 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[])
- {
- #if defined CPSTRCMP
- if (strcmp("/gps", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xff0000aa, " [GPS] Niste u vozilu!");
- ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, " GPS:", gpsstr, "Izaberi", "Odustani");
- return 1;
- }
- if (strcmp("/gpsoff", cmdtext, true, 10) == 0)
- {
- if(GPS_Activated[playerid] == 1)
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, 0xffff00aa, " [GPS] Iskljucili ste GPS!");
- GPS_Activated[playerid] = 0;
- }
- return 1;
- }
- #endif
- 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] Stigli ste na zeljenu lokaciju!");
- 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
Advertisement