Advertisement
Guest User

Scoots

a guest
Mar 14th, 2009
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.77 KB | None | 0 0
  1. #include <a_samp>
  2. //--------------------------------------------\\
  3. //             Car service script             \\
  4. //                  By Scoots                 \\
  5. //--------------------------------------------\\
  6. new gates[100];
  7. new mainigais14;
  8. new servis;
  9. #if defined FILTERSCRIPT
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n--------------------------------------");
  14.     print(" Car Service by Scoots");
  15.     print("--------------------------------------\n");
  16.     return 1;
  17. }
  18.  
  19. public OnFilterScriptExit()
  20. {
  21.     return 1;
  22. }
  23.  
  24. #else
  25.  
  26. main()
  27. {
  28.     print("\n----------------------------------");
  29.     print(" Car Service by Scoots");
  30.     print("----------------------------------\n");
  31. }
  32.  
  33. #endif
  34.  
  35. public OnGameModeInit()
  36. {
  37.     CreateObject(5153, -1729.7943, 120.4920, 3.1279, 0.0000, 7.3172, 90.1369);
  38.     CreateObject(5153, -1733.7448, 120.4920, 3.1279, 0.0000, 7.3172, 90.1369);
  39.     CreateObject(931, -1729.9257, 123.4396, 2.5166, 0.0000, 0.0000, 0.0000);
  40.     CreateObject(931, -1733.6521, 123.4396, 2.5166, 0.0000, 0.0000, 0.0000);
  41.     CreateObject(931, -1733.6521, 132.9393, 2.5166, 0.0000, 0.0000, 0.0000);
  42.     CreateObject(931, -1729.8005, 132.9146, 2.5166, 0.0000, 0.0000, 0.0000);
  43.     CreateObject(931, -1729.8256, 128.0147, 2.7666, 0.0000, 0.0000, 359.1406);
  44.     CreateObject(931, -1733.6771, 128.0645, 2.7916, 0.0000, 0.0000, 358.2811);
  45.     CreateObject(8947, -1737.7142, 94.5269, 5.6075, 0.0000, 0.0000, 227.9783);
  46.     CreateObject(3627, -1729.0521, 128.1118, 6.3692, 0.0000, 0.0000, 0.0000);
  47.     CreateObject(2048, -1739.1853, 86.5796, 7.4498, 0.0000, 0.0000, 139.1247);
  48.     CreateObject(2714, -1743.0940, 106.9275, 4.5427, 0.0000, 0.0000, 227.7514);
  49.     CreateObject(10281, -1747.4453, 103.3479, 7.4939, 359.1406, 345.3896, 228.5061);
  50.     CreateObject(2041, -1749.5804, 97.7148, 2.7596, 0.0000, 0.0000, 0.0000);
  51.     CreateObject(2042, -1749.0029, 97.0802, 2.6347, 0.0000, 0.0000, 0.0000);
  52.     CreateObject(2043, -1748.6304, 98.3446, 2.6587, 0.0000, 0.0000, 257.7270);
  53.     CreateObject(2358, -1749.9338, 97.0423, 2.6712, 0.0000, 0.0000, 318.7470);
  54.     CreateObject(2567, -1734.7246, 84.4022, 4.4823, 0.0000, 0.0000, 317.8876);
  55.     CreateObject(2694, -1749.0278, 97.7575, 2.6632, 0.0000, 0.0000, 0.0000);
  56.     CreateObject(3632, -1725.3789, 91.6778, 3.0295, 0.0000, 0.0000, 0.0000);
  57.     CreateObject(3761, -1734.8925, 100.1665, 4.5287, 0.0000, 0.0000, 48.1285);
  58.     CreateObject(930, -1737.6969, 86.3375, 3.0306, 0.0000, 0.0000, 0.0000);
  59.     CreateObject(919, -1727.5463, 88.8519, 3.0124, 0.0000, 0.0000, 47.2690);
  60.     CreateObject(927, -1743.5664, 90.4464, 2.6552, 0.0000, 0.0000, 317.8876);
  61.     CreateObject(958, -1731.6144, 97.0303, 3.4315, 0.0000, 0.0000, 136.6504);
  62.     CreateObject(1689, -1745.4757, 101.4604, 9.8719, 0.0000, 0.0000, 47.2690);
  63.  
  64.  
  65.  
  66.  
  67. /////////////////////////////////////
  68.     CreateObject(1673, -1737.997925, 92.161110, 3.701880, 0.0000, 180.3775, 316.1687);
  69.     CreateObject(1673, -1741.000854, 88.910912, 3.701880, 0.0000, 180.3775, 316.1687);
  70.     CreateObject(1673, -1738.373291, 86.535767, 3.701880, 0.0000, 180.3775, 316.1687);
  71.     CreateObject(1673, -1735.395386, 89.810966, 3.701880, 0.0000, 180.3775, 316.1687);
  72.  
  73.  
  74.     CreateObject(1673, -1726.440918, 81.703072, 3.676881, 0.0000, 180.3775, 314.4499);
  75.     CreateObject(1673, -1724.013550, 84.253227, 3.676881, 0.0000, 180.3775, 314.4499);
  76.     CreateObject(1673, -1730.469849, 85.253288, 3.676881, 0.0000, 180.3775, 314.4499);
  77.     CreateObject(1673, -1728.037598, 87.853279, 3.676881, 0.0000, 180.3775, 314.4499);
  78.  
  79.  
  80.     gates[1] = CreateObject(5153, -1736.337769, 93.242935, 2.502866, 0.0000, 203.5825, 226.7873);
  81.     gates[2] = CreateObject(5153, -1732.784302, 89.992737, 2.502866, 0.0000, 203.5825, 226.7873);
  82.  
  83.     gates[3] = CreateObject(2678, -1743.697144, 96.076836, 2.563910, 90.2409, 0.0000, 317.8876);
  84.     gates[4] = CreateObject(2678, -1745.423828, 94.151718, 2.563913, 90.2409, 0.0000, 317.8876);
  85.     gates[5] = CreateObject(2678, -1746.273682, 98.426918, 2.563913, 90.2409, 0.0000, 317.8876);
  86.     gates[6] = CreateObject(2678, -1748.000366, 96.501801, 2.563913, 90.2409, 0.0000, 317.8876);
  87.  
  88.     gates[7] = CreateObject(5153, -1733.789795, 124.930420, 3.752870, 0.0000, 23.5162, 89.2776);
  89.     gates[8] = CreateObject(5153, -1733.739746, 131.105270, 3.752870, 0.0000, 23.5162, 89.2776);
  90.     gates[9] = CreateObject(5153, -1729.763550, 124.905418, 3.752870, 0.0000, 23.5162, 89.2776);
  91.     gates[10] = CreateObject(5153, -1729.713501, 131.055511, 3.752870, 0.0000, 23.5162, 89.2776);
  92.  
  93.  
  94.     //auto=serviss------------------------------------------------------------------
  95.     servis= CreateObject(9093, -1746.541260, 102.497986, 4.325224, 0.0000, 0.0000, 318.7470);
  96.  
  97.     return 1;
  98. }
  99.  
  100. public OnGameModeExit()
  101. {
  102.     return 1;
  103. }
  104.  
  105. public OnPlayerRequestClass(playerid, classid)
  106. {
  107.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  108.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  109.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  110.     return 1;
  111. }
  112.  
  113. public OnPlayerRequestSpawn(playerid)
  114. {
  115.     return 1;
  116. }
  117.  
  118. public OnPlayerConnect(playerid)
  119. {
  120.     return 1;
  121. }
  122.  
  123. public OnPlayerDisconnect(playerid, reason)
  124. {
  125.     return 1;
  126. }
  127.  
  128. public OnPlayerSpawn(playerid)
  129. {
  130.     return 1;
  131. }
  132.  
  133. public OnPlayerDeath(playerid, killerid, reason)
  134. {
  135.     return 1;
  136. }
  137.  
  138. public OnVehicleSpawn(vehicleid)
  139. {
  140.     return 1;
  141. }
  142.  
  143. public OnVehicleDeath(vehicleid, killerid)
  144. {
  145.     return 1;
  146. }
  147.  
  148. public OnPlayerText(playerid, text[])
  149. {
  150.     return 1;
  151. }
  152.  
  153. public OnPlayerPrivmsg(playerid, recieverid, text[])
  154. {
  155.     return 1;
  156. }
  157.  
  158. public OnPlayerCommandText(playerid, cmdtext[])
  159. {
  160.  
  161. //auto-servis
  162.     if(strcmp("/carsrv", cmdtext, true, 6) == 0) {
  163.           if(mainigais14 == 0) {
  164.                 SendClientMessage(playerid, 0x33AA33AA,"Durvis atveras");
  165.                 MoveObject(servis, -1746.541260, 102.497986, 6.875228, 5); //vala
  166.                 mainigais14 = 1;
  167.             } else if(mainigais14 == 1) {
  168.                 SendClientMessage(playerid, 0xAA3333AA,"Durvis aizveras");
  169.                 MoveObject(servis, -1746.541260, 102.497986, 4.325224, 5); //ciet
  170.                 mainigais14 = 0;
  171.             }
  172.           return 1;
  173.     }
  174.  
  175. /////////////////////
  176.     if (strcmp(cmdtext, "/cslift2d", true) == 0){
  177.     MoveObject(gates[3], -1743.697144, 96.076836, 2.563910, 1);
  178.     MoveObject(gates[4], -1745.423828, 94.151718, 2.563913, 1);
  179.     MoveObject(gates[5], -1746.273682, 98.426918, 2.563913, 1);
  180.     MoveObject(gates[6], -1748.000366, 96.501801, 2.563913, 1);
  181.     return 1;
  182.     }
  183.     if (strcmp(cmdtext, "/cslift2u", true) == 0){
  184.     MoveObject(gates[3], -1743.697144, 96.076836, 5.638916, 1);
  185.     MoveObject(gates[4], -1745.423828, 94.151718, 5.638915, 1);
  186.     MoveObject(gates[5], -1746.273682, 98.426918, 5.613915, 1);
  187.     MoveObject(gates[6], -1748.000366, 96.501801, 5.613915, 1);
  188.     return 1;
  189.     }
  190. //////////////////////////////////////////////////////////////
  191.  
  192.     if (strcmp(cmdtext, "/csliftd", true) == 0){
  193.     MoveObject(gates[1], -1736.337769, 93.242935, 2.502866, 1);
  194.     MoveObject(gates[2], -1732.784302, 89.992737, 2.502866, 1);
  195.     return 1;
  196.     }
  197.     if (strcmp(cmdtext, "/csliftu", true) == 0){
  198.     MoveObject(gates[1], -1736.337769, 93.242935, 5.652872, 1);
  199.     MoveObject(gates[2], -1732.784302, 89.992737, 5.677872, 1);
  200.     return 1;
  201.     }
  202. ///////////////////////////////////////////////////////////////////
  203. ///////////////////////////////////////////////////////////////////
  204.     if (strcmp(cmdtext, "/indliftd", true) == 0){
  205.     MoveObject(gates[7], -1733.789795, 124.930420, 3.752870, 1);
  206.     MoveObject(gates[8], -1733.739746, 131.105270, 3.752870, 1);
  207.     MoveObject(gates[9], -1729.763550, 124.905418, 3.752870, 1);
  208.     MoveObject(gates[10], -1729.713501, 131.055511, 3.752870, 1);
  209.     return 1;
  210.     }
  211.     if (strcmp(cmdtext, "/indliftu", true) == 0){
  212.     MoveObject(gates[7], -1733.789795, 124.930420, 5.402873, 1);
  213.     MoveObject(gates[8], -1733.739746, 131.105270, 5.452871, 1);
  214.     MoveObject(gates[9], -1729.763550, 124.905418, 5.452871, 1);
  215.     MoveObject(gates[10], -1729.713501, 131.055511, 5.477872, 1);
  216.     return 1;}
  217.  
  218.     return 0;
  219. }
  220.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement