/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\ This Script Was Done By Khaled Raouf Plz Report Any Bugs Msn:river_zoqak@hotmail.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\*/ #include #include #define COLOR_SYSTEM 0xB2EBE0AA //~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~ //forwards forward Trip(); forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); forward PlaneInPos(Float:radi,Float:x, Float:y, Float:z); //new new Plane; //~~~~~~~~~~~~~~~~~~~~~ #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 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); 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) { new Float:x,Float:y,Float:z; GetObjectPos(Plane,x,y,z); SetPlayerPos(playerid,x +10,y -10,z -5); SetPlayerInterior(playerid,0); return 1; } if (strcmp("/flyb", cmdtext, true) == 0) { if (IsPlayerAdmin(playerid)) { new Float:x,Float:y,Float:z; GetObjectPos(Plane,x,y,z); PlayerPlaySound(playerid,128,2.384830,33.103397,1199.849976); PlayerPlaySound(playerid,128,x,y,z); SendClientMessageToAll(COLOR_SYSTEM,"=Flight Beta= HOA5 AirTrip Started"); SetTimer("Trip",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 Trip() { if (PlaneInPos(1,2115.552734, -2442.980469, 18.449501)) { 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,25); 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); } return 1; }