Advertisement
Guest User

DaStaFlexX

a guest
Mar 13th, 2008
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 15.17 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define COLOR_GREY 0xAFAFAFAA
  4. #define COLOR_GREEN 0x33AA33AA
  5. #define COLOR_RED 0xAA3333AA
  6. #define COLOR_YELLOW 0xFFFF00AA
  7. #define COLOR_WHITE 0xFFFFFFAA
  8. #define COLOR_BLUE 0x0000BBAA
  9. #define COLOR_LIGHTBLUE 0x33CCFFAA
  10. #define COLOR_ORANGE 0xFF9900AA
  11. #define COLOR_PINK 0xF020F0
  12.  
  13.  
  14. #define pi 3.14159265
  15.  
  16. new tmpstring[256];
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. #define MAX_CARS 150
  24. #define MAX_POINTS 309
  25.  
  26.  
  27. new Float:DrivePoints[13][3] ={
  28. {0.0,0.0,0.0},
  29.  
  30.  
  31.  
  32. {-44.3985,2496.6660,16.1428}, // 1
  33. {24.3157,2500.4241,16.1504}, // 2
  34. {115.1637,2493.5911,16.1504}, // 3
  35. {191.7585,2515.5801,16.2879}, // 4
  36. {241.5370,2505.0950,16.1428}, // 5
  37. {334.7701,2495.5500,16.1424}, // 6
  38. {395.5205,2498.2644,16.1423}, // 7
  39. {395.8009,2508.1602,16.1429}, // 8
  40. {356.6581,2509.7859,16.1850}, // 9
  41. {243.5584,2519.8533,16.3302}, // 10
  42. {188.1285,2520.8726,16.3784}, // 11
  43. {-33.2113,2521.4604,16.1417} // 12
  44.  
  45. };
  46.  
  47. new Connections[13][4] ={
  48. {0,0,0,0},
  49. {2,0,0,0},
  50. {3,0,0,0},
  51. {4,0,0,0},
  52. {5,0,0,0},
  53. {6,0,0,0},
  54. {7,0,0,0},
  55. {8,0,0,0},
  56. {9,0,0,0},
  57. {10,0,0,0},
  58. {11,0,0,0},
  59. {12,0,0,0},
  60. {1,2,0,0}
  61.  
  62. };
  63. new Float:KMH[13] ={
  64. 0.000000,20.000000,25.000000,25.000000,30.000000,25.000000,20.000000,20.000000,25.000000,25.000000,
  65. 23.000000,20.000000,20.000000
  66.  
  67. };
  68.  
  69.  
  70.  
  71.  
  72. new ConnectionsAmount[MAX_POINTS];
  73. new CAR_AMOUNT_USED;
  74. new bool:calculations;
  75. new BrakeTimer;
  76. new ObjectBrakeTimer;
  77. new AutomaticCars[MAX_CARS];
  78. new CarPosition[MAX_CARS];
  79. new LastCarPosition[MAX_CARS];
  80. new bool:HasFreezed[MAX_PLAYERS][MAX_CARS];
  81. new Freezed[MAX_CARS];
  82. new BotAngle[MAX_CARS];
  83. new bool:ObjectHasFreezed[MAX_CARS][MAX_CARS];
  84.  
  85. public OnFilterScriptInit()
  86. {
  87.     for(new i=0;i<MAX_POINTS;i++) for(new j=0;j<4;j++) if(Connections[i][j] != 0) ConnectionsAmount[i]++;
  88.            
  89.     BrakeTimer = SetTimer("ObjectUpdate",700,1);
  90.     ObjectBrakeTimer = SetTimer("ObjectToObjectUpdate",800,1);
  91.     SetGameModeText("Car Bots Edition 0.82");
  92.     return 1;
  93. }
  94.  
  95. public OnFilterScriptExit()
  96. {
  97.     for(new i=0;i<CAR_AMOUNT_USED;i++) if(IsValidObject(AutomaticCars[i])) DestroyObject(AutomaticCars[i]);
  98.     KillTimer(BrakeTimer);
  99.     KillTimer(ObjectBrakeTimer);
  100.     return 1;
  101. }
  102.  
  103. forward Float:itan(Float:opp,Float:adj);
  104. forward ObjectUpdate();
  105. forward ObjectToObjectUpdate();
  106. forward Horn(playerid);
  107.  
  108.  
  109. enum SavePlayerPosEnum {
  110.     Float:LastX,
  111.     Float:LastY,
  112.     Float:LastZ
  113.     }
  114. new SavePlayerPos[MAX_PLAYERS][SavePlayerPosEnum];
  115.  
  116. stock PositionsWechsel(i)
  117. {
  118.     new Float:x,Float:y,Float:z;
  119.     GetPlayerPos(i, x, y, z);
  120.     if(floatabs(floatabs(SavePlayerPos[i][LastX]) - floatabs(x)) + floatabs(floatabs(SavePlayerPos[i][LastY]) - floatabs(y)) > 10) return 1;
  121.     return 0;
  122. }
  123.  
  124. stock GetPointDistanceToPoint(Float:x,Float:y,Float:x2,Float:y2) //By Sacky
  125. {
  126. new Float:tmpdis;
  127. tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x2)),2)+floatpower(floatabs(floatsub(y,y2)),2));
  128. return floatround(tmpdis);
  129. }
  130.  
  131. Float:GetXYInBackOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  132. {
  133.     new Float:a;
  134.     GetPlayerPos(playerid, x, y, a);
  135.     if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  136.     else GetPlayerFacingAngle(playerid, a);
  137.     x -= (distance * floatsin(-a, degrees));
  138.     y -= (distance * floatcos(-a, degrees));
  139.     return a;
  140. }
  141.  
  142. Float:GetXYInBackOfObject(objectid, &Float:x, &Float:y, Float:distance)
  143. {
  144.     new Float:a;
  145.     new Float:xx,Float:yy;
  146.     GetObjectPos(AutomaticCars[objectid], x, y, a);
  147.     GetObjectRot(AutomaticCars[objectid],xx,yy,a);
  148.     x -= (distance * floatsin(-a, degrees));
  149.     y -= (distance * floatcos(-a, degrees));
  150.     return a;
  151. }
  152.  
  153.  
  154. public ObjectToObjectUpdate()
  155. {
  156.     for(new i=0; i<CAR_AMOUNT_USED; i++)
  157.     {
  158.         new Float:x,Float:y,Float:z,Float:x2,Float:y2/*,Float:z2*/;
  159.         GetXYInBackOfObject(i,x2,y2,15.0);
  160.         for(new j=0;j<CAR_AMOUNT_USED;j++)
  161.         {
  162.             if(Freezed[i] > 0)
  163.             {
  164.                 GetObjectPos(AutomaticCars[j],x,y,z);
  165.                 if(GetPointDistanceToPoint(x,y,x2,y2) < 5 && (floatabs(BotAngle[j] - BotAngle[i]) < 50 || floatabs(BotAngle[j] - BotAngle[i]) > 310) && !ObjectHasFreezed[j][i] && i!=j)
  166.                 {
  167.                     if(!ObjectHasFreezed[i][j])
  168.                     {
  169.                         StopObject(AutomaticCars[j]);
  170.                         ObjectHasFreezed[i][j] = true;
  171.                         Freezed[j]++;
  172.                         j=0;
  173.                     }
  174.                 }
  175.             } else {
  176.                 if(ObjectHasFreezed[i][j])
  177.                 {
  178.                     Freezed[j]--;
  179.                     if(Freezed[j] < 0) Freezed[j] = 0;
  180.                     if(Freezed[j] == 0)
  181.                     {
  182.                         if(KMH[LastCarPosition[j]] != 0.00000)
  183.                             MoveObject(AutomaticCars[j],DrivePoints[CarPosition[j]][0],
  184.                                                         DrivePoints[CarPosition[j]][1],
  185.                                                         DrivePoints[CarPosition[j]][2],
  186.                                                         KMH[LastCarPosition[j]]);
  187.                         else
  188.                             MoveObject(AutomaticCars[j],DrivePoints[CarPosition[j]][0],
  189.                                                         DrivePoints[CarPosition[j]][1],
  190.                                                         DrivePoints[CarPosition[j]][2],
  191.                                                         15.0);
  192.                         //END IF
  193.                     }
  194.                     ObjectHasFreezed[i][j] = false;
  195.                 }
  196.             }
  197.         }
  198.     }
  199. }
  200.  
  201. public ObjectUpdate()
  202. {
  203.     for(new i=0; i<MAX_PLAYERS; i++)
  204.     {
  205.         if(IsPlayerConnected(i))
  206.         {
  207.             new Float:x,Float:y,Float:z,Float:x2,Float:y2,Float:z2;
  208.             GetXYInBackOfPlayer(i,x2,y2,5.0);
  209.             new Vi;
  210.             Vi=GetPlayerVehicleID(i);
  211.             new Float:vang;
  212.             if(IsPlayerInAnyVehicle(i)) GetVehicleZAngle(Vi,vang);
  213.             for(new j=0;j<CAR_AMOUNT_USED;j++)
  214.             {
  215.                 GetObjectPos(AutomaticCars[j],x,y,z);
  216.                 if(GetPointDistanceToPoint(x,y,x2,y2) < 15 && (floatabs(BotAngle[j] - vang) < 50 || floatabs(BotAngle[j] - vang) > 310) && !PositionsWechsel(i) && IsPlayerInAnyVehicle(i))
  217.                 {
  218.                     if(!HasFreezed[i][j])
  219.                     {
  220.                         StopObject(AutomaticCars[j]);
  221.                         HasFreezed[i][j] = true;
  222.                         Freezed[j]++;
  223.                         PlayerPlaySound(i,1147,x,y,z);
  224.                         new ran = random(6);
  225.                         if(ran == 0)
  226.                             SendClientMessage(i,COLOR_BLUE,"***Car Bot: Drive, you idiot!");
  227.                         else if(ran == 1)
  228.                             SendClientMessage(i,COLOR_BLUE,"***Car Bot: What are you waiting for?!?");
  229.                         else if(ran == 2)
  230.                             SendClientMessage(i,COLOR_BLUE,"***Car Bot: Standing... I hate standing!!!");
  231.                         else if(ran == 3)
  232.                             SendClientMessage(i,COLOR_BLUE,"***Car Bot: If you've found the 'W' Button let me know...");
  233.                         else if(ran == 4)
  234.                             SendClientMessage(i,COLOR_BLUE,"***Car Bot: Mooove, MOOOVE!!!");
  235.                         else if(ran == 5)
  236.                             SendClientMessage(i,COLOR_BLUE,"***Car Bot: Sunday Driver!!!");
  237.                         //END IF
  238.                         SetTimerEx("Horn",500,0,"t",i);
  239.                     }
  240.                 } else {
  241.                     if(HasFreezed[i][j])
  242.                     {
  243.                         Freezed[j]--;
  244.                         if(Freezed[j] < 0) Freezed[j] = 0;
  245.                         if(Freezed[j] == 0)
  246.                         {
  247.                             if(KMH[LastCarPosition[j]] != 0.00000)
  248.                                 MoveObject(AutomaticCars[j],DrivePoints[CarPosition[j]][0],
  249.                                                             DrivePoints[CarPosition[j]][1],
  250.                                                             DrivePoints[CarPosition[j]][2],
  251.                                                             KMH[LastCarPosition[j]]);
  252.                             else
  253.                                 MoveObject(AutomaticCars[j],DrivePoints[CarPosition[j]][0],DrivePoints[CarPosition[j]][1],DrivePoints[CarPosition[j]][2],15.0);
  254.                             //END IF
  255.                         }
  256.                         HasFreezed[i][j] = false;
  257.                     }
  258.                 }
  259.             }
  260.             SavePlayerPos[i][LastX] = x2;
  261.             SavePlayerPos[i][LastY] = y2;
  262.             SavePlayerPos[i][LastZ] = z2;
  263.         }
  264.     }
  265. }
  266.  
  267. public Horn(playerid)
  268. {
  269.     new Float:x,Float:y,Float:z;
  270.     GetPlayerPos(playerid,x,y,z);
  271.     PlayerPlaySound(playerid,1147,x,y,z);
  272. }
  273.  
  274.  
  275. stock IsNoCrossway(Drivepoint)
  276. {
  277.     return (ConnectionsAmount[Drivepoint] > 1) ? 0 : 1;
  278. }
  279.  
  280. stock ChooseAim(oid,Drivepoint)
  281. {
  282.     new zufall = Connections[Drivepoint][random(ConnectionsAmount[Drivepoint])];
  283.     LastCarPosition[oid] = CarPosition[oid];
  284.     CarPosition[oid] = zufall;
  285.     return zufall;
  286. }
  287.  
  288. stock str(i)
  289. {
  290.     new t[256];
  291.     valstr(t,i);
  292.     return t;
  293. }
  294.        
  295. stock STM(string[])
  296. {
  297.     SendClientMessageToAll(COLOR_GREEN,string);
  298. }
  299.  
  300. strtok(const string[], &index)
  301. {
  302.     new length = strlen(string);
  303.     while ((index < length) && (string[index] <= ' '))
  304.     {
  305.         index++;
  306.     }
  307.  
  308.     new offset = index;
  309.     new result[20];
  310.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  311.     {
  312.         result[index - offset] = string[index];
  313.         index++;
  314.     }
  315.     result[index - offset] = EOS;
  316.     return result;
  317. }
  318.  
  319. stock CorrectAmount(playerid,&anzahl)
  320. {
  321.     new oid = CreateObject(1696,0.0,0.0,1000.0,0.0,0.0,0.0); //Normal:3593 //Fass:1225 //Rampe1:1696 //Rauch:2780
  322.     DestroyObject(oid);
  323.     if(oid + anzahl > 145)
  324.     {
  325.         anzahl = 145 - oid;
  326.         SendClientMessage(playerid,COLOR_RED,"Attention! You've created too much Car Bots. The amount has been automatically decreased.");
  327.         SendClientMessage(playerid,COLOR_RED,"The amount of the bots + your other server objects mustn't be above 150");
  328.     }
  329. }
  330.  
  331. public OnPlayerRequestSpawn(playerid)
  332. {
  333.     return 1;
  334. }
  335.  
  336. public OnPlayerConnect(playerid)
  337. {
  338.     SendClientMessage(playerid,COLOR_GREEN,"***Loaded Car Bots by Tjong");
  339.     return 1;
  340. }
  341.  
  342. public OnPlayerDisconnect(playerid, reason)
  343. {
  344.     for(new i=0;i<CAR_AMOUNT_USED;i++)
  345.     {
  346.         if(HasFreezed[playerid][i])
  347.         {
  348.             Freezed[i]--;
  349.             if(Freezed[i] < 0) Freezed[i] = 0;
  350.             if(Freezed[i] == 0)
  351.             {
  352.                 if(KMH[LastCarPosition[i]] != 0.00000)
  353.                     MoveObject(AutomaticCars[i],DrivePoints[CarPosition[i]][0],
  354.                                                 DrivePoints[CarPosition[i]][1],
  355.                                                 DrivePoints[CarPosition[i]][2],
  356.                                                 KMH[LastCarPosition[i]]);
  357.                 else
  358.                     MoveObject(AutomaticCars[i],DrivePoints[CarPosition[i]][0],DrivePoints[CarPosition[i]][1],DrivePoints[CarPosition[i]][2],15.0);
  359.                 //endif
  360.             }
  361.         }
  362.         HasFreezed[playerid][i] = false;
  363.     }
  364.     return 1;
  365. }
  366.  
  367. public OnPlayerSpawn(playerid)
  368. {
  369.     return 1;
  370. }
  371.  
  372. public OnPlayerDeath(playerid, killerid, reason)
  373. {
  374.     return 1;
  375. }
  376.  
  377. public OnVehicleSpawn(vehicleid)
  378. {
  379.     return 1;
  380. }
  381.  
  382. public OnVehicleDeath(vehicleid, killerid)
  383. {
  384.     return 1;
  385. }
  386.  
  387. public OnPlayerText(playerid, text[])
  388. {
  389.     return 1;
  390. }
  391.  
  392. public OnPlayerPrivmsg(playerid, recieverid, text[])
  393. {
  394.     return 1;
  395. }
  396.  
  397. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  398. {
  399.     return 1;
  400. }
  401.  
  402. public OnPlayerCommandText(playerid, cmdtext[])
  403. {
  404.     new cmd[256];
  405.     new idx;
  406.     new tmp[256];
  407.  
  408.     cmd = strtok(cmdtext, idx);
  409.  
  410.     if (strcmp(cmd, "/startcarbots", true)==0 && IsPlayerAdmin(playerid))
  411.     {
  412.        
  413.         tmp = strtok(cmdtext, idx);
  414.         if(!strlen(tmp)) {
  415.             SendClientMessage(playerid, COLOR_WHITE, "Benutze: /startcarbots [Amount]");
  416.             return 1;
  417.         }
  418.         new amount = strval(tmp);
  419.        
  420.         for(new i=0;i<MAX_CARS;i++)
  421.         {
  422.             if(IsValidObject(AutomaticCars[i])) DestroyObject(AutomaticCars[i]);
  423.         }
  424.  
  425.         CorrectAmount(playerid,amount);
  426.        
  427.         CAR_AMOUNT_USED = amount;
  428.         for(new i=1;i<amount;i++)
  429.         {
  430.             new rand = random(MAX_POINTS);
  431.             new oid = CreateObject(1696+random(2),DrivePoints[rand][0],DrivePoints[rand][1],DrivePoints[rand][2]+20,0.0,0.0,0.0); //3593 //12957
  432.             AutomaticCars[i] = oid;
  433.             CarPosition[i] = rand;
  434.             MoveObject(AutomaticCars[i],DrivePoints[rand][0],DrivePoints[rand][1],DrivePoints[rand][2],5.0);
  435.         }
  436.  
  437.        
  438.         return 1;
  439.     }
  440.    
  441.     if (strcmp(cmd, "/stopcarbots", true)==0 && IsPlayerAdmin(playerid))
  442.     {
  443.         for(new i=0;i<CAR_AMOUNT_USED;i++)
  444.         {
  445.             if(IsValidObject(AutomaticCars[i])) DestroyObject(AutomaticCars[i]);
  446.         }
  447.         return 1;
  448.     }
  449.    
  450.     if (strcmp(cmd, "/tpto", true)==0 && IsPlayerAdmin(playerid))
  451.     {
  452.         tmp = strtok(cmdtext, idx);
  453.         if(!strlen(tmp)) {
  454.             SendClientMessage(playerid, COLOR_WHITE, "Benutze: /startcarbots [Amount]");
  455.             return 1;
  456.         }
  457.         new Float:x = floatstr(tmp);
  458.        
  459.         tmp = strtok(cmdtext, idx);
  460.         if(!strlen(tmp)) {
  461.             SendClientMessage(playerid, COLOR_WHITE, "Benutze: /startcarbots [Amount]");
  462.             return 1;
  463.         }
  464.         new Float:y = floatstr(tmp);
  465.        
  466.         tmp = strtok(cmdtext, idx);
  467.         if(!strlen(tmp)) {
  468.             SendClientMessage(playerid, COLOR_WHITE, "Benutze: /startcarbots [Amount]");
  469.             return 1;
  470.         }
  471.         new Float:z = floatstr(tmp);
  472.        
  473.         SetPlayerPos(playerid,x,y,z);
  474.        
  475.         return 1;
  476.     }
  477.     if (strcmp(cmd, "/botcommands", true)==0 && IsPlayerAdmin(playerid))
  478.     {
  479.         SendClientMessage(playerid,COLOR_LIGHTBLUE,"~~~~~~~~~~~~~~~B~o~t~~~C~o~m~m~a~n~d~s~~~~~~~~~~~~~~~");
  480.         SendClientMessage(playerid,COLOR_GREEN,"/startcarbots [Amount (1- ~150)] ---> An amount of car bots start");
  481.         SendClientMessage(playerid,COLOR_GREEN,"/stopcarbots ---> Removes all Car Bots from the map");
  482.         SendClientMessage(playerid,COLOR_GREEN,"/calculations ---> Debug (Shows the ID of the bot that has been moved at last)");
  483.         SendClientMessage(playerid,COLOR_LIGHTBLUE,"~~~~~~~~~~~~~~~B~o~t~~~C~o~m~m~a~n~d~s~~~~~~~~~~~~~~~");
  484.         return 1;
  485.     }
  486.    
  487.     if (strcmp(cmd, "/calculations", true)==0)
  488.     {
  489.         if(!calculations) calculations = true; else calculations = false;
  490.         return 1;
  491.     }
  492.    
  493.     return 0;
  494. }
  495.  
  496.  
  497.  
  498. public OnPlayerInfoChange(playerid)
  499. {
  500.     return 1;
  501. }
  502.  
  503. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  504. {
  505.     return 1;
  506. }
  507.  
  508. public OnPlayerExitVehicle(playerid, vehicleid)
  509. {
  510.     return 1;
  511. }
  512.  
  513. public OnPlayerStateChange(playerid, newstate, oldstate)
  514. {
  515.     return 1;
  516. }
  517.  
  518. public OnPlayerEnterCheckpoint(playerid)
  519. {
  520.     return 1;
  521. }
  522.  
  523. public OnPlayerLeaveCheckpoint(playerid)
  524. {
  525.     return 1;
  526. }
  527.  
  528. public OnPlayerEnterRaceCheckpoint(playerid)
  529. {
  530.     return 1;
  531. }
  532.  
  533. public OnPlayerLeaveRaceCheckpoint(playerid)
  534. {
  535.     return 1;
  536. }
  537.  
  538. public OnRconCommand(cmd[])
  539. {
  540.     return 1;
  541. }
  542.  
  543. public OnObjectMoved(objectid)
  544. {
  545.     new bool:IsObjectBot;
  546.     new i;
  547.     for(i=0;i<CAR_AMOUNT_USED;i++)
  548.     {
  549.         if(objectid == AutomaticCars[i])
  550.         {
  551.             if(calculations)
  552.             {
  553.                 format(tmpstring,sizeof(tmpstring),"Object Moved: ~g~%d",i);
  554.                 GameTextForAll(tmpstring,5000,6);
  555.             }
  556.             IsObjectBot = true;
  557.             break;
  558.         }
  559.     }
  560.        
  561.     if(IsObjectBot)
  562.     {
  563.         //STM("TEST");
  564.         new aim;
  565.         if(IsNoCrossway(CarPosition[i]))
  566.         {
  567.             aim = Connections[CarPosition[i]][0];
  568.             LastCarPosition[i] = CarPosition[i];
  569.             CarPosition[i] = aim;
  570.         } else aim = ChooseAim(i,CarPosition[i]);
  571.         if(Connections[LastCarPosition[i]][0] == 0) aim = 1;
  572.         //STM(str(aim));
  573.         new Float:ang;
  574.         new Float:x,Float:y,Float:lx,Float:ly;
  575.         new Float:xdiff,Float:ydiff;
  576.         x = DrivePoints[aim][0];
  577.         y = DrivePoints[aim][1];
  578.         lx = DrivePoints[LastCarPosition[i]][0];
  579.         ly = DrivePoints[LastCarPosition[i]][1];
  580.         xdiff = floatabs(x) - floatabs(lx);
  581.         ydiff = floatabs(y) - floatabs(ly);
  582.         new eins;
  583.         new winkel;
  584.         if(xdiff >= 0 && ydiff >= 0)
  585.         {
  586.             winkel = 0;
  587.             eins = -1;
  588.         } else if(xdiff <= 0 && ydiff >= 0) {
  589.             winkel = 0;
  590.             eins = 1;
  591.         } else if(xdiff >= 0 && ydiff <= 0) {
  592.             winkel = 180;
  593.             eins = 1;
  594.         } else if(xdiff <= 0 && ydiff <= 0) {
  595.             winkel = 180;
  596.             eins = -1;
  597.         }
  598.  
  599.         if(floatabs(ydiff) == 0) ydiff = 1;
  600.         new Float:divi = floatdiv(floatabs(xdiff),floatabs(ydiff));
  601.         if(divi > 2) divi = 2;
  602.        
  603.         ang = winkel + (floatmul(45,divi) * eins);
  604.         BotAngle[i] = floatround(ang);
  605.         SetObjectRot(objectid,0.0,0.0,ang);
  606.         if(KMH[LastCarPosition[i]] != 0.00000)
  607.         {
  608.             MoveObject(objectid,DrivePoints[aim][0],DrivePoints[aim][1],DrivePoints[aim][2],KMH[LastCarPosition[i]]);
  609.         } else {
  610.             MoveObject(objectid,DrivePoints[aim][0],DrivePoints[aim][1],DrivePoints[aim][2],15.0);
  611.         }
  612.         CarPosition[i] = aim;
  613.     }
  614.     return 1;
  615. }
  616.  
  617. public OnPlayerPickUpPickup(playerid, pickupid)
  618. {
  619.     return 1;
  620. }
  621.  
  622. public OnPlayerSelectedMenuRow(playerid, row)
  623. {
  624.     return 1;
  625. }
  626.  
  627. public OnPlayerExitedMenu(playerid)
  628. {
  629.     return 1;
  630. }
  631.  
  632.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement