/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\ This Script Was Done By Khaled Raouf Plz Report Any Bugs Msn:river_zoqak@hotmail.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\*/ #include #include #define COLOR_SYSTEM 0xB2EBE0AA //~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~ //forwards forward TripLS(); forward TripSF(); forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); forward PlaneInPos(Float:radi,Float:x, Float:y, Float:z); //new new Plane; new InPlane[200]; //~~~~~~~~~~~~~~~~~~~~~ #define FILTERSCRIPT #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Flight Bot 0.2 by Khaled Raouf"); print("--------------------------------------\n"); Plane = CreateObject(1683, 2115.552734, -2442.980469, 18.449501, 0.0000, 0.0000, 270.0001); //Plane CreateObject(3881, 2091.363281, -2478.347412, 14.398438, 0.0000, 0.0000, 67.5000); //Ticket Saler /*if (PlaneInPos(1,2115.552734, -2442.980469, 18.449501)) { SetTimer("TripLS",60000,1); }*/ return 1; } public OnFilterScriptExit() { if (IsValidObject(Plane)) { DestroyObject(Plane); } return 1; } #else main() { print("\n----------------------------------"); print(" Flight Bot 0.2 by Khaled Raouf"); print("----------------------------------\n"); } #endif public OnGameModeInit() { return 1; } public OnGameModeExit() { return 1; } public OnPlayerConnect(playerid) { SendClientMessage(playerid,COLOR_SYSTEM,"Flight Bot Script By Khaled Raouf for info type /bs if you admin type /bsa"); 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 OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/bs", cmdtext, true) == 0) { SendClientMessage(playerid,COLOR_SYSTEM,"[Plane Script] /BuyTicket /EF"); return 1; } if (strcmp("/bsa", cmdtext, true) == 0) { if (IsPlayerAdmin(playerid)) { SendClientMessage(playerid,COLOR_SYSTEM,"[Plane Script] /flyb /tower /scam [off]"); } return 1; } if (strcmp("/tower", cmdtext, true) == 0) { if (IsPlayerAdmin(playerid)) { new VIK = GetPlayerVehicleID(playerid); new Float:x,Float:y,Float:z; GetObjectPos(Plane,x,y,z); SetPlayerPos(playerid,x +10,y -10,z -5); SetVehiclePos(VIK,x +10,y -10,z -5); PutPlayerInVehicle(playerid,VIK,0); } return 1; } if (strcmp("/buyticket", cmdtext, true) == 0) { if (PlayerToPoint(3, playerid,2091.363281, -2478.347412, 14.398438) || PlaneInPos(1,2115.552734, -2442.980469, 18.449501)) { GivePlayerMoney(playerid,-500); InPlane[playerid] = 1; SetPlayerInterior(playerid,1); SetPlayerPos(playerid,2.384830,33.103397,1199.849976); SendClientMessage(playerid,COLOR_SYSTEM,"[Ticket Seller] You Did Buy Ticket To San Fiaro Type /EF To Exit"); GivePlayerWeapon(playerid,46,1); } else { SendClientMessage(playerid,COLOR_SYSTEM,"You Aren't At Ticket Sell Place"); } return 1; } if (strcmp("/ef", cmdtext, true) == 0) { if(IsPlayerConnected(playerid) && InPlane[playerid] == 1) { new Float:x,Float:y,Float:z; GetObjectPos(Plane,x,y,z); InPlane[playerid] = 0; SetPlayerPos(playerid,x +10,y -10,z -5); SetPlayerInterior(playerid,0); } return 1; } if (strcmp("/flyb", cmdtext, true) == 0) //manuel take off { if (PlaneInPos(1,2115.552734, -2442.980469, 18.449501)) { SetTimer("TripLS",50,1); } return 1; } return 1; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~Pos Checker~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; } public PlaneInPos(Float:radi,Float:x,Float:y,Float:z) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetObjectPos(Plane,oldposx,oldposy,oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } return 0; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~BASIC SCRIPTS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public TripLS() { if (PlaneInPos(1,2115.552734, -2442.980469, 18.449501)) { SendClientMessageToAll(COLOR_SYSTEM,"[Los Santos Tower] HOA5 Trip Takeing Off From Los Santos to San Fiaro"); MoveObject(Plane,2092.911133, -2584.532715, 18.449501,15); SetObjectRot(Plane,0.0000, 0.0000, 270.0001); } if (PlaneInPos(1,2092.911133, -2584.532715, 18.449501)) { MoveObject(Plane,1699.186646, -2593.892090, 18.449501,45); SetObjectRot(Plane,0.0000, 0.0000, 180.0000); } if (PlaneInPos(1,1699.186646, -2593.892090, 18.449501)) { MoveObject(Plane,543.694946, -1865.636719, 400.341370,50); SetObjectRot(Plane,0.0000, 350.5462, 135.0000); } if (PlaneInPos(1,543.694946, -1865.636719, 400.341370)) { MoveObject(Plane,30.788696, -1654.380249, 370.882050,50); SetObjectRot(Plane,0.0000, 0.0000, 157.5000); } if (PlaneInPos(1,30.788696, -1654.380249, 370.882050)) { MoveObject(Plane,-72.495308, -2290.200439, 487.342468,50); SetObjectRot(Plane,0.0000, 0.0000, 281.2500); } if (PlaneInPos(1,-72.495308, -2290.200439, 487.342468)) { MoveObject(Plane,-254.781830, -2856.270020, 596.209045,50); SetObjectRot(Plane,0.0000, 0.0000, 236.2501); } if (PlaneInPos(1,-254.781830, -2856.270020, 596.209045)) { MoveObject(Plane,-863.923096, -2854.411621, 416.837158,50); SetObjectRot(Plane,0.0000, 0.0000, 191.2501); } if (PlaneInPos(1,-863.923096, -2854.411621, 416.837158)) { MoveObject(Plane,-1347.326050, -2785.851074, 498.667053,50); SetObjectRot(Plane,0.0000, 0.0000, 146.2501); } if (PlaneInPos(1,-863.923096, -2854.411621, 416.837158)) { MoveObject(Plane,-1347.326050, -2785.851074, 498.667053,50); SetObjectRot(Plane,0.0000, 0.0000, 146.2501); } if (PlaneInPos(1,-1347.326050, -2785.851074, 498.667053)) { MoveObject(Plane,-2089.214111, -2611.886963, 541.666260,50); SetObjectRot(Plane,0.0000, 0.0000, 146.2501); } if (PlaneInPos(1,-2089.214111, -2611.886963, 541.666260)) { MoveObject(Plane,-2784.983154, -1691.560913, 443.732056,50); SetObjectRot(Plane,0.0000, 0.0000, 112.5001); } if (PlaneInPos(1,-2784.983154, -1691.560913, 443.732056)) { MoveObject(Plane,-1974.721680, -740.806824, 443.312958,50); SetObjectRot(Plane,0.0000, 0.0000, 78.7520); } if (PlaneInPos(1,-1974.721680, -740.806824, 443.312958)) { MoveObject(Plane,-1319.313477, -630.512024, 510.194946,50); SetObjectRot(Plane,0.0000, 0.0000, 56.2520); } if (PlaneInPos(1,-1319.313477, -630.512024, 510.194946)) { MoveObject(Plane,-1156.039917, -314.686768, 306.291504,50); SetObjectRot(Plane,0.0000, 0.0000, 67.5002); } if (PlaneInPos(1,-1156.039917, -314.686768, 306.291504)) { MoveObject(Plane,-799.982544, 366.145660, 378.825989,50); SetObjectRot(Plane,0.0000, 0.0000, 67.5002); } if (PlaneInPos(1,-799.982544, 366.145660, 378.825989)) { MoveObject(Plane,-722.029846, 571.141113, 344.425232,50); SetObjectRot(Plane,0.0000, 0.0000, 67.5002); } if (PlaneInPos(1,-722.029846, 571.141113, 344.425232)) { MoveObject(Plane,-1030.428223, 420.707794, 100.710632,45); SetObjectRot(Plane,0.0000, 0.0000, 225.0002); } if (PlaneInPos(1,-1030.428223, 420.707794, 100.710632)) { MoveObject(Plane,-1151.053223, 337.412231, 23.840542,25); SetObjectRot(Plane,0.0000, 350.5462, 225.0002); } if (PlaneInPos(1,-1151.053223, 337.412231, 23.840542)) { MoveObject(Plane,-1411.697998, 73.781128, 23.434992,15); SetObjectRot(Plane,0.0000, 350.5462, 225.0002); } if (PlaneInPos(1,-1411.697998, 73.781128, 23.434992)) { MoveObject(Plane,-1649.878906, -154.075653, 19.051065,15); SetObjectRot(Plane,0.0000, 0.0000, 45.0000); SetTimer("TripSF",60000,1); SendClientMessageToAll(COLOR_SYSTEM,"[San Fiaro Tower] HOA5 Trip Arrived To San Fiaro"); } return 1; } public TripSF() { if (PlaneInPos(1,-1649.878906, -154.075653, 19.051065)) { SendClientMessageToAll(COLOR_SYSTEM,"[San Fiaro Tower] HOA5 Trip Takeing Off From San Fiaro to Los Santos"); MoveObject(Plane,-1447.592529, 47.282215, 19.051064,15); SetObjectRot(Plane,0.0000, 0.0000, 45.0000); } if (PlaneInPos(1,-1447.592529, 47.282215, 19.051064)) { MoveObject(Plane,-1381.237793, 112.834915, 79.251236,45); SetObjectRot(Plane,0.0000, 334.2169, 45.0000); } if (PlaneInPos(1,-1381.237793, 112.834915, 79.251236)) { MoveObject(Plane,-1174.218262, 317.862793, 268.566650,50); SetObjectRot(Plane,0.0000, 0.0000, 45.0000); } if (PlaneInPos(1,-1174.218262, 317.862793, 268.566650)) { MoveObject(Plane,-1028.293701, 395.297852, 278.809296,50); SetObjectRot(Plane,0.0000, 0.0000, 11.2500); } if (PlaneInPos(1,-1028.293701, 395.297852, 278.809296)) { MoveObject(Plane,-1028.200073, 191.615112, 241.984619,50); SetObjectRot(Plane,0.0000, 0.0000, 292.5000); } if (PlaneInPos(1,-1028.200073, 191.615112, 241.984619)) { MoveObject(Plane,-861.907043, -75.860458, 256.525604,50); SetObjectRot(Plane,0.0000, 0.0000, 315.0000); } if (PlaneInPos(1,-861.907043, -75.860458, 256.525604)) { MoveObject(Plane,-441.583984, -501.108215, 387.387695,50); SetObjectRot(Plane,0.0000, 0.0000, 315.0000); } if (PlaneInPos(1,-441.583984, -501.108215, 387.387695)) { MoveObject(Plane,-740.460388, -196.794479, 268.611328,50); SetObjectRot(Plane,0.0000, 0.0000, 315.0000); } if (PlaneInPos(1,-740.460388, -196.794479, 268.611328)) { MoveObject(Plane,-1347.326050, -2785.851074, 498.667053,50); SetObjectRot(Plane,0.0000, 0.0000, 146.2501); } if (PlaneInPos(1,-1347.326050, -2785.851074, 498.667053)) { MoveObject(Plane,-238.806854, -774.873535, 444.685516,50); SetObjectRot(Plane,0.0000, 0.0000, 315.0000); } if (PlaneInPos(1,-238.806854, -774.873535, 444.685516)) { MoveObject(Plane,-30.077911, -992.645752, 377.607178,50); SetObjectRot(Plane,0.0000, 0.0000, 326.2500); } if (PlaneInPos(1,-30.077911, -992.645752, 377.607178)) { MoveObject(Plane,-1974.721680, -740.806824, 443.312958,50); SetObjectRot(Plane,0.0000, 0.0000, 78.7520); } if (PlaneInPos(1,-1974.721680, -740.806824, 443.312958)) { MoveObject(Plane,38.650074, -1164.562134, 259.658173,50); SetObjectRot(Plane,0.0000, 0.0000, 281.2500); } if (PlaneInPos(1,38.650074, -1164.562134, 259.658173)) { MoveObject(Plane,448.800385, -1599.591553, 346.478882,50); SetObjectRot(Plane,0.0000, 0.0000, 348.7500); } if (PlaneInPos(1,448.800385, -1599.591553, 346.478882)) { MoveObject(Plane,764.886719, -1822.733032, 438.110596,50); SetObjectRot(Plane,0.0000, 0.0000, 303.7500); } if (PlaneInPos(1,764.886719, -1822.733032, 438.110596)) { MoveObject(Plane,1184.405151, -2363.551270, 371.229950,50); SetObjectRot(Plane,0.0000, 0.0000, 348.7500); } if (PlaneInPos(1,1184.405151, -2363.551270, 371.229950)) { MoveObject(Plane,1288.767822, -2446.858887, 140.721298,45); SetObjectRot(Plane,0.0000, 0.0000, 0.0000); } if (PlaneInPos(1,1288.767822, -2446.858887, 140.721298)) { MoveObject(Plane,1416.021118, -2485.992920, 50.191208,25); SetObjectRot(Plane,0.0000, 348.8273, 0.0000); } if (PlaneInPos(1,1509.898560, -2488.248047, 33.027214)) { MoveObject(Plane,1692.584839, -2492.114014, 18.457314,25); SetObjectRot(Plane,0.0000, 2.5783, 0.0000); } if (PlaneInPos(1,1416.021118, -2485.992920, 50.191208)) { MoveObject(Plane,1509.898560, -2488.248047, 33.027214,15); SetObjectRot(Plane,0.0000, 2.5783, 0.0000); SendClientMessageToAll(COLOR_SYSTEM,"[Los Santos Tower] HOA5 Trip Arrived To Los Santos"); } return 1; }