#define MAX_AIR 10
enum AirInf
{
Obj[2],
point,
bool: moving,
reis
};
new AInfo[MAX_AIR][AirInf];
public OnGameModeInit()
{
AInfo[0][reis] = 1;
//Aero
AInfo[0][Obj][0] = CreateObject(14553, 1559.568725,-2451.655029,17.368839,13.000001,0.000000,-179.300262, 300);
AInfo[0][Obj][1] = CreateObject(14548, 1559.568725,-2451.655029,17.368839,13.000001,0.000000,-179.300262, 300);
AInfo[0][moving] = true;
AInfo[0][point] = 52;
SetTimer("SetAirTimeOut", 1000*30, false);
return 1;
}
public OnObjectMoved(objectid)
{
if(objectid == AInfo[0][Obj][0])
{
switch(AInfo[0][point])
{
case 0: MoveAirObjects(0, 25); // (Ид самолёта, скорость перемещения)
case 1..4: MoveAirObjects(0, 18);
case 5: MoveAirObjects(0, 22);
case 6: MoveAirObjects(0, 27);
case 7: MoveAirObjects(0, 31);
case 8: MoveAirObjects(0, 36);
case 9: MoveAirObjects(0, 40);
case 10: MoveAirObjects(0, 45);
case 11: MoveAirObjects(0, 49);
case 12: MoveAirObjects(0, 52);
case 13..19: MoveAirObjects(0, 55);
case 20: MoveAirObjects(0, 25);
case 21: MoveAirObjects(0, 25);
case 22: MoveAirObjects(0, 20), SCMA(COLOR_YELLOW, "???????? ??????? ?????? ?? Los-Santos ????????? ? San Fierro");
case 23: MoveAirObjects(0, 18);
case 24: MoveAirObjects(0, 15);
case 25: MoveAirObjects(0, 13);
case 26: MoveAirObjects(0, 13);
case 27: MoveAirObjects(0, 13);
case 28: MoveAirObjects(0, 18);
case 29: SetTimer("SetAirTimeOut", 1000*60, false), SendClientMessageToAll(COLOR_WHITE, "???????? ??????? ?????? ?? Los-Santos ?????? ? San Fierro. ??????? ????? ??????"), AInfo[0][reis] = 2;
case 30..32: MoveAirObjects(0, 6);
case 33: MoveAirObjects(0, 10);
case 34: MoveAirObjects(0, 10);
case 35: MoveAirObjects(0, 30);
case 36..41: MoveAirObjects(0, 55);
case 42: MoveAirObjects(0, 35);
case 43: MoveAirObjects(0, 30), SendClientMessageToAll(COLOR_WHITE, "???????? ??????? ?????? ?? San Fierro ????????? ? Los-Santos");
case 44: MoveAirObjects(0, 25);
case 45: MoveAirObjects(0, 20);
case 46..48: MoveAirObjects(0, 14);
case 49: MoveAirObjects(0, 20);
case 50,51: MoveAirObjects(0, 10);
case 52: SetTimer("SetAirTimeOut", 1000*60, false), SendClientMessageToAll(COLOR_WHITE, "???????? ??????? ?????? ?? San Fierro ?????? ? Los-Santos. ??????? ????? ??????"), AInfo[0][reis] = 1;
case 53: MoveAirObjects(0, 6);
case 54: MoveAirObjects(0, 6), AInfo[0][reis] = 0;
case 55: SetTimer("SetAirTimeOut", 1000*3, false), AInfo[0][point] = 0;
default: SetTimer("SetAirTimeOut", 1000*3, false), AInfo[0][point] = 0;
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256]б idx;
cmd = strtok(cmdtext, idx);
else if(strcmp(cmd, "/areset", true) == 0)
{
if(!IsPlayerAdmin(playerid) return 1;
for(new i=0; i<2;i++) DestroyObject(AInfo[0][Obj][i]);
AInfo[0][Obj][0] = CreateObject(14553, 1454.598022,-2491.184326,17.252395,13.399991,0.000000,87.899986);
AInfo[0][Obj][1] = CreateObject(14548, 1454.598022,-2491.184326,17.252395,13.399991,0.000000,87.899986);
AInfo[0][point] = 0;
AInfo[0][moving] = true;
SetTimer("SetAirTimeOut", 1000*15, false);
return 1;
}
return 0;
}
MoveAirObjects(plane, oSpeed)
{
for(new i = 0; i<2; i++)
{
switch(plane)
{
case 0:
{
if(AInfo[plane][moving] == true)
{
switch(AInfo[plane][point])
{
case 0: MoveObject(AInfo[plane][Obj][i], 2053.415283,-2492.926025,17.143045,oSpeed,13.299983,0.000000,88.399955);
case 1: MoveObject(AInfo[plane][Obj][i], 2098.265625,-2512.281494,17.120628,oSpeed,13.299983,0.000000,51.600120);
case 2: MoveObject(AInfo[plane][Obj][i], 2107.484619,-2544.301269,17.174470,oSpeed,13.299983,0.000000,4.600122);
case 3: MoveObject(AInfo[plane][Obj][i], 2092.409667,-2575.323486,17.162384,oSpeed,13.299983,0.000000,-40.399913);
case 4: MoveObject(AInfo[plane][Obj][i], 2015.240112,-2594.397460,17.358905,oSpeed,13.000012,0.000000,-86.799919);
case 5: MoveObject(AInfo[plane][Obj][i], 1897.592651,-2592.607177,18.471857,oSpeed,11.599986,0.199999,-90.499801);
case 6: MoveObject(AInfo[plane][Obj][i], 1720.748413,-2591.184814,22.432897,oSpeed,9.099978,0.199999,-90.499801);
case 7: MoveObject(AInfo[plane][Obj][i], 1426.416137,-2588.501953,59.629043,oSpeed,5.199979,-13.800008,-90.499801);
case 8: MoveObject(AInfo[plane][Obj][i], 1122.357910,-2517.029541,107.084152,oSpeed,5.199979,-13.800008,-98.399703);
case 9: MoveObject(AInfo[plane][Obj][i], 1017.066650,-2433.684082,125.725318,oSpeed,-1.100018,-17.899988,-128.399627);
case 10: MoveObject(AInfo[plane][Obj][i], 868.353637,-2286.289550,124.998863,oSpeed,-1.100018,-7.199974,-141.099685);
case 11: MoveObject(AInfo[plane][Obj][i], 585.755432,-1788.639892,176.751922,oSpeed,-1.100018,1.400022,-150.099822);
case 12: MoveObject(AInfo[plane][Obj][i], 159.691741,-1054.085815,322.882324,oSpeed,-1.100018,-10.099975,-164.700088);
case 13: MoveObject(AInfo[plane][Obj][i], 166.647766,-911.165161,348.001098,oSpeed,3.899980,-2.399979,177.199600);
case 14: MoveObject(AInfo[plane][Obj][i], 177.330413,-725.820556,373.951202,oSpeed,-1.900024,-2.399979,177.199600);
case 15: MoveObject(AInfo[plane][Obj][i], 110.533370,835.341796,502.952209,oSpeed,0.000000,0.000000,-162.300109);
case 16: MoveObject(AInfo[plane][Obj][i], -544.002319,1047.622192,543.323425,oSpeed,2.399999,16.000013,-131.200027);
case 17: MoveObject(AInfo[plane][Obj][i], -705.973876,791.303222,293.013702,oSpeed,15.300013,0.000000,-46.399974);
case 18: MoveObject(AInfo[plane][Obj][i], -1048.693115,449.043884,46.350074,oSpeed,20.500032,0.000000,-45.299987);
case 19: MoveObject(AInfo[plane][Obj][i], -1107.604370,384.274108,38.894912,oSpeed,14.500031,0.000000,-45.299987);
case 20: MoveObject(AInfo[plane][Obj][i], -1174.686523,317.887908,27.408067,oSpeed,7.900015,0.000000,-45.299987);
case 21: MoveObject(AInfo[plane][Obj][i], -1227.575073,265.549011,22.403526,oSpeed,7.900015,0.000000,-45.299987);
case 22: MoveObject(AInfo[plane][Obj][i], -1248.785766,244.558273,19.480550,oSpeed,10.700025,0.000000,-45.299987);
case 23: MoveObject(AInfo[plane][Obj][i], -1679.139892,-185.532638,17.941892,oSpeed,13.099999,0.000000,-45.200027);
case 24: MoveObject(AInfo[plane][Obj][i], -1695.961181,-233.497039,17.328351,oSpeed,13.400000,0.000000,-3.400011);
case 25: MoveObject(AInfo[plane][Obj][i], -1682.883300,-256.238708,17.671979,oSpeed,13.400000,0.000000,42.999961);
case 26: MoveObject(AInfo[plane][Obj][i], -1656.092407,-262.969451,17.699853,oSpeed,13.400000,0.000000,88.599937);
case 27: MoveObject(AInfo[plane][Obj][i], -1595.035644,-212.542785,17.701171,oSpeed,13.400000,0.000000,134.699966);
case 28: MoveObject(AInfo[plane][Obj][i], -1552.760742,-170.715759,17.772178,oSpeed,13.400000,0.000000,134.699966);
case 29: MoveObject(AInfo[plane][Obj][i], -1518.555419,-109.333564,18.187795,oSpeed,13.200015,0.000000,171.400192);
case 30: MoveObject(AInfo[plane][Obj][i], -1532.157348,-76.689056,17.863075,oSpeed,13.200015,0.000000,-134.799880);
case 31: MoveObject(AInfo[plane][Obj][i], -1536.346679,-42.216072,17.802696,oSpeed,13.200015,0.000000,174.399322);
case 32: MoveObject(AInfo[plane][Obj][i], -1516.995483,-24.341810,17.820735,oSpeed,13.200015,0.000000,135.098968);
case 33: MoveObject(AInfo[plane][Obj][i], -1413.463623,79.546203,22.965494,oSpeed,4.900009,0.000000,135.098968);
case 34: MoveObject(AInfo[plane][Obj][i], -1286.523803,206.923858,49.793090,oSpeed,2.500011,0.000000,135.098968);
case 35: MoveObject(AInfo[plane][Obj][i], -901.320007,593.456665,207.814437,oSpeed,-1.399988,0.000000,135.098968);
case 36: MoveObject(AInfo[plane][Obj][i], -40.318813,88.862854,240.656036,oSpeed,0.000000,-20.399991,37.200077);
case 37: MoveObject(AInfo[plane][Obj][i], -7.696372,-831.214904,277.685089,oSpeed,9.199999,-2.500000,0.000000);
case 38: MoveObject(AInfo[plane][Obj][i], 121.898445,-1369.732910,278.318206,oSpeed,10.999986,5.199996,11.300002);
case 39: MoveObject(AInfo[plane][Obj][i], 643.137451,-2368.281738,93.404571,oSpeed,10.999986,0.299993,36.500000);
case 40: MoveObject(AInfo[plane][Obj][i], 1014.185058,-2589.716796,103.512969,oSpeed,12.800020,0.000000,88.000038);
case 41: MoveObject(AInfo[plane][Obj][i], 1385.969848,-2594.836425,50.691898,oSpeed,12.800020,0.000000,89.700012);
case 42: MoveObject(AInfo[plane][Obj][i], 1566.364257,-2593.489501,24.509532,oSpeed,1.300023,0.000000,89.700012);
case 43: MoveObject(AInfo[plane][Obj][i], 1703.116943,-2593.850341,17.303533,oSpeed,13.100030,0.000000,90.000007);
case 44: MoveObject(AInfo[plane][Obj][i], 2074.068359,-2593.449951,20.942094,oSpeed,13.400031,0.000000,89.800010);
case 45: MoveObject(AInfo[plane][Obj][i], 2106.079833,-2572.491699,17.148210,oSpeed,13.400031,0.000000,133.699874);
case 46: MoveObject(AInfo[plane][Obj][i], 2110.058349,-2541.281250,17.114027,oSpeed,13.400031,0.000000,179.699905);
case 47: MoveObject(AInfo[plane][Obj][i], 2103.074218,-2510.155029,17.115751,oSpeed,13.400031,0.000000,-143.600051);
case 48: MoveObject(AInfo[plane][Obj][i], 2045.557128,-2494.081542,17.031759,oSpeed,13.400031,0.000000,-90.100059);
case 49: MoveObject(AInfo[plane][Obj][i], 1637.830810,-2493.318115,17.452402,oSpeed,13.000001,0.000000,-90.799987);
case 50: MoveObject(AInfo[plane][Obj][i], 1574.909667,-2472.258300,17.391979,oSpeed,13.000001,0.000000,-124.399719);
case 51: MoveObject(AInfo[plane][Obj][i], 1559.568725,-2451.655029,17.368839,oSpeed,13.000001,0.000000,-179.300262);
case 52: MoveObject(AInfo[plane][Obj][i], 1539.965942,-2470.382568,17.276123,oSpeed,13.000001,0.000000,133.699600);
case 53: MoveObject(AInfo[plane][Obj][i], 1511.613647,-2492.675048,17.360113,oSpeed,13.000001,0.000000,113.199653);
case 54: MoveObject(AInfo[plane][Obj][i], 1454.598022,-2491.184326,17.252395,oSpeed,13.399991,0.000000,87.899986);
default: MoveObject(AInfo[plane][Obj][i],1454.598022,-2491.184326,17.252395,300,13.399991, 0.000000,87.899986);
}
}
}
}
}
AInfo[0][point]++;
return 1;
}
forward SetAirTimeOut();
public SetAirTimeOut()
{
switch (AInfo[0][reis])
{
case 0: MoveAirObjects(0, 25);
case 1:SendClientMessageToAll(COLOR_WHITE, "???????? ??????? ?????? ?? Los-Santos ???????? ? San Fierro"), MoveAirObjects(0, 6);
case 2: SendClientMessageToAll(COLOR_WHITE, "???????? ??????? ?????? ?? San Fierro ???????? ? Los-Santos "), MoveAirObjects(0, 6);
}
return 1;
}
Только проверить нет возможности, так как большая часть обьектов в моде на стримере.
|
Ну я возпользовавшись твоим советом набросал функцию удаления и повторного создания обьекта с сохранением последних кооржинат, в момент выходи игрока с сервера. Посмотрим что выйдет из этого.
|