#include <a_samp>#include <gl_common>// for PlaySoundForPlayersInRange()#define NUM_SHIP_ROUTE_POINTS 25#define SHIP_HULL_ID 9585 // massive cargo ship\'s hull. This is used as the main object#define SHIP_MOVE_SPEED 10.0#define SHIP_DRAW_DISTANCE 300.0#define NUM_SHIP_ATTACHMENTS 10new Float:gShipHullOrigin[3] ={ -2409.8438, 1544.9453, 7.0000 }; // so we can convert world space to model space for attachment positionsnew gShipAttachmentModelIds[NUM_SHIP_ATTACHMENTS] = {9586, // Ship main platform19121, // Ship rails9584, // Bridge exterior9698, // Bridge interior9821, // Bridge interior doors9818, // Bridge radio desk9819, // Captain\'s desk9822, // Captain\'s seat9820, // Bridge ducts and lights9590 // Cargo bay area};new Float:gShipAttachmentPos[NUM_SHIP_ATTACHMENTS][3] = {// these are world space positions used on the original cargo ship in the game// they will be converted to model space before attaching{-2412.16, 1544.90, 17.73},{-2299.40, 1544.90, 19.15},{-2485.0781, 1544.9453, 26.1953},{-2473.5859, 1543.7734, 29.0781},{-2474.3594, 1547.2422, 24.7500},{-2470.2656, 1544.9609, 33.8672},{-2470.4531, 1551.1172, 33.1406},{-2470.9375, 1550.7500, 32.9063},{-2474.6250, 1545.0859, 33.0625},{-2403.5078, 1544.9453, 8.7188}};// Pirate ship route points (position/rotation)new Float:gShipRoutePoints[NUM_SHIP_ROUTE_POINTS][6] = {{-2970.0, -2447.3000488281, 0.00, 0.00, 0.00, 0.00},{-3361.0, -2481.1000976563, 0.00, 0.00, 0.00, 0.00},{-3818.1999511719, -2574.8000488281, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511719, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511720, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511721, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511722, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511723, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511724, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511725, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511726, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511727, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511728, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511729, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511730, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511731, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511732, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511733, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511734, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511735, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511736, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511737, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511738, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511739, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511740, 0.00, 0.00, 0.00, 0.00}}; new gShipCurrentPoint = 1; // current route point the ship is at. We start at route 1// SA-MP objectsnew gMainShipObjectId;new gShipsAttachments[NUM_SHIP_ROUTE_POINTS];forward StartMovingTimer();//-------------------------------------------------public StartMovingTimer(){MoveObject(gMainShipObjectId,gShipRoutePoints[gShipCurrentPoint][0], gShipRoutePoints[gShipCurrentPoint][1], gShipRoutePoints[gShipCurrentPoint][2], SHIP_MOVE_SPEED / 2.0, // slower for the first route gShipRoutePoints[gShipCurrentPoint][3], gShipRoutePoints[gShipCurrentPoint][4], gShipRoutePoints[gShipCurrentPoint][5]);}//-------------------------------------------------public OnFilterScriptInit(){gMainShipObjectId = CreateObject(SHIP_HULL_ID, gShipRoutePoints[0][0], gShipRoutePoints[0][1], gShipRoutePoints[0][2], gShipRoutePoints[0][3], gShipRoutePoints[0][4], gShipRoutePoints[0][5], SHIP_DRAW_DISTANCE);new x=0;while(x != NUM_SHIP_ATTACHMENTS) { gShipsAttachments
gShipsAttachments
new Float:gShipRoutePoints[NUM_SHIP_ROUTE_POINTS][6] = {{-2970.0, -2447.3000488281, 0.00, 0.00, 0.00, 0.00},{-3361.0, -2481.1000976563, 0.00, 0.00, 0.00, 0.00},{-3818.1999511719, -2574.8000488281, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511719, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511720, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511721, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511722, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511723, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511724, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511725, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511726, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511727, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511728, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511729, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511730, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511731, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511732, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511733, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511734, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511735, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511736, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511737, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511738, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511739, 0.00, 0.00, 0.00, 0.00},{-4045.0, -2531.1999511740, 0.00, 0.00, 0.00, 0.00}};