Advertisement
Guest User

r4z0r

a guest
Jun 11th, 2009
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.92 KB | None | 0 0
  1. //Dream House v1.5 with updates
  2. //Dream house v1.5 with updates
  3. #include <a_samp>
  4.  
  5. #define FILTERSCRIPT
  6. #define COLOR_DARKBLUE 0x0000D0FF
  7. #define COLOR_WHITE 0xFFFFFFFF
  8. #define COLOR_LIGHTBLUE 0xBBFFFFFF
  9. #define COLOR_BLACK 0x000000FF
  10. #define COLOR_RED 0xAA3333AA
  11. #if defined FILTERSCRIPT
  12. new lift1;
  13. main()
  14. {
  15.  
  16. }
  17. public OnPlayerConnect(playerid)
  18. {
  19. SendClientMessage(playerid,COLOR_LIGHTBLUE, "*New* Dream House by r4z0r");
  20. return 1;
  21. }
  22. public OnFilterScriptInit()
  23.  
  24. {
  25. print("----Dream House 1.5----");
  26. print("----Made by r4z0r----");
  27. print("----2009 all rights reserved----");
  28.  
  29. AddStaticVehicle(463,-782.4836,624.9443,0.9875,82.0729,7,7); // limuzina
  30. AddStaticVehicle(409,-822.6947,726.7102,18.5427,234.6256,1,1); // quad
  31. AddStaticVehicle(457,-749.1896,719.3625,17.8169,242.5829,63,1); // quad
  32. AddStaticVehicle(471,-791.5720,614.4626,0.9346,56.3660,66,71); // cross
  33. AddStaticVehicle(471,-790.5920,615.8664,0.9393,57.4145,120,112); // cross
  34. AddStaticVehicle(454,-776.3168,608.4803,0.1165,147.3560,26,26); // JAHTA !!
  35.  
  36. CreateObject(9509, -796.627808, 636.007629, 3.448239, 0.0000, 0.0000, 56.2500);// objects xD
  37. CreateObject(638, -773.876892, 618.769409, 1.145273, 0.0000, 0.0000, 326.2500);
  38. CreateObject(638, -775.404297, 616.474670, 1.145273, 0.0000, 0.0000, 326.2500);
  39. CreateObject(638, -776.911316, 614.213745, 1.145273, 0.0000, 0.0000, 326.2500);
  40. CreateObject(638, -778.406921, 611.952393, 1.145273, 0.0000, 0.0000, 326.2500);
  41. CreateObject(650, -812.239563, 660.963196, 2.016704, 0.0000, 0.0000, 225.0000);
  42. CreateObject(949, -784.869080, 604.199646, 1.084523, 0.0000, 0.0000, 348.7500);
  43. CreateObject(949, -780.580505, 610.787048, 1.084523, 0.0000, 0.0000, 0.0000);
  44. CreateObject(2195, -784.352234, 612.791992, 1.065427, 0.0000, 0.0000, 0.0000);
  45. CreateObject(2245, -792.754272, 609.571106, 2.472111, 0.0000, 0.0000, 0.0000);
  46. CreateObject(2253, -803.353027, 643.685791, 1.070697, 0.0000, 0.0000, 56.2500);
  47. CreateObject(2253, -808.888306, 647.488708, 1.426604, 0.0000, 0.0000, 321.0934);
  48. CreateObject(2253, -812.571777, 652.436951, 2.372979, 0.0000, 0.0000, 292.5000);
  49. CreateObject(2253, -813.164734, 657.679810, 3.050575, 0.0000, 0.0000, 270.0000);
  50. CreateObject(2253, -807.480469, 657.947266, 2.254272, 0.0000, 0.0000, 348.7500);
  51. CreateObject(2253, -806.744629, 654.207153, 1.930685, 0.0000, 359.1406, 299.4529);
  52. CreateObject(2253, -804.447327, 652.168335, 1.605494, 0.0000, 0.0000, 319.2972);
  53. CreateObject(2253, -799.360535, 648.723694, 1.251242, 0.0000, 0.0000, 320.1566);
  54. CreateObject(2253, -795.109070, 645.267334, 1.176372, 0.0000, 0.0000, 319.2972);
  55. CreateObject(2253, -799.146851, 640.266541, 0.994256, 0.0000, 0.0000, 317.5783);
  56. CreateObject(2253, -790.159180, 640.448303, 1.173948, 0.0000, 0.0000, 33.7500);
  57. CreateObject(2253, -795.330811, 636.709473, 0.986448, 0.0000, 0.0000, 33.7500);
  58. CreateObject(2253, -788.375183, 635.427368, 1.173948, 0.0000, 0.0000, 11.2500);
  59. CreateObject(2253, -794.355957, 633.173035, 0.986448, 0.0000, 0.0000, 0.0000);
  60. CreateObject(2253, -795.580566, 617.765625, 0.988811, 0.0000, 0.0000, 281.2500);
  61. CreateObject(2253, -795.760803, 623.454834, 0.986448, 0.0000, 0.0000, 354.8434);
  62. CreateObject(2253, -794.458435, 629.432129, 0.986448, 0.0000, 0.0000, 258.7500);
  63. CreateObject(2345, -781.926453, 625.822083, 0.906556, 0.0000, 0.0000, 326.2500);
  64. CreateObject(2345, -780.128662, 624.620850, 0.850671, 0.0000, 0.0000, 326.2500);
  65. CreateObject(2811, -790.068054, 617.775940, 0.454896, 0.0000, 0.0000, 0.0000);
  66. CreateObject(2811, -783.923340, 626.814697, 0.447814, 0.0000, 0.0000, 0.0000);
  67. CreateObject(2811, -788.233154, 629.761169, 0.447815, 0.0000, 0.0000, 0.0000);
  68. CreateObject(624, -784.520142, 602.485229, -0.537276, 0.0000, 0.0000, 78.7500);
  69. CreateObject(717, -787.923218, 624.701233, 0.195348, 0.0000, 0.0000, 236.2500);
  70. CreateObject(3810, -788.836975, 617.256836, 3.537555, 0.0000, 0.0000, 146.1727);
  71. CreateObject(3810, -792.670410, 611.553101, 3.487554, 1.7189, 0.0000, 146.2500);
  72. CreateObject(3532, -789.445740, 620.851685, 1.130333, 0.0000, 0.0000, 348.7500);
  73. CreateObject(3532, -787.293701, 623.278870, 1.130333, 0.0000, 0.0000, 326.2500);
  74. CreateObject(3532, -788.753723, 624.580139, 1.102875, 0.0000, 0.0000, 337.5000);
  75. CreateObject(3532, -786.425232, 626.699829, 1.130333, 0.0000, 0.0000, 54.5311);
  76. CreateObject(1500, -789.016235, 607.522522, 6.581183, 0.0000, 0.0000, 56.2500);
  77. CreateObject(1481, -778.825378, 613.858887, 1.151365, 0.0000, 0.0000, 236.2501);
  78. CreateObject(1485, -778.815857, 614.324463, 1.206794, 4.2972, 0.0000, 258.7500);
  79. CreateObject(1485, -778.838989, 614.192505, 1.181794, 0.0000, 0.0000, 270.0000);
  80. CreateObject(1485, -779.192322, 613.794189, 1.206794, 0.0000, 0.0000, 0.0000);
  81. CreateObject(1485, -779.289978, 613.708374, 1.161869, 0.0000, 0.0000, 0.0000);
  82. CreateObject(1667, -776.499146, 618.455627, 0.661819, 0.0000, 0.0000, 348.7500);
  83. CreateObject(1665, -776.524658, 618.204712, 0.608693, 0.0000, 0.0000, 315.0000);
  84. CreateObject(1485, -776.472717, 618.123901, 0.623301, 0.0000, 0.0000, 135.0000);
  85. CreateObject(1520, -776.546143, 618.594238, 0.632369, 0.0000, 0.0000, 315.0000);
  86. CreateObject(1666, -783.910583, 623.799622, 0.654005, 0.0000, 0.0000, 0.0000);
  87. CreateObject(1280, -778.111206, 622.750793, 0.849595, 0.0000, 0.0000, 56.2500);
  88. CreateObject(1670, -778.607422, 615.997498, 0.583694, 0.0000, 0.0000, 22.5000);
  89. CreateObject(1825, -775.079102, 619.728394, 0.426394, 0.0000, 0.0000, 0.0000);
  90. CreateObject(1670, -775.144714, 619.757507, 1.333694, 0.0000, 0.0000, 0.0000);
  91. lift1 = CreateObject(3280, -782.127075, 607.310242, 0.473245, 0.0000, 0.0000, 326.2500); // lift
  92.  
  93. return 1;
  94. }
  95.  
  96. public OnFilterScriptExit()
  97. {
  98. return 1;
  99. }
  100.  
  101. #else
  102. #endif
  103.  
  104. public OnPlayerCommandText(playerid, cmdtext[])
  105. {
  106. if (strcmp(cmdtext, "/liftup", true)==0)
  107. {
  108. MoveObject (lift1,-782.112183, 607.335754, 10.323227, 0.7);
  109. SendClientMessage(playerid, 0x000000F, "Lift Gore");
  110. return 1;
  111. }
  112. if (strcmp(cmdtext, "/liftdown", true)==0)
  113. {
  114. MoveObject (lift1,-782.127075, 607.310242, 0.473245, 0.7);
  115. SendClientMessage(playerid, 0x000000F, "Lift Dole");
  116. return 1;
  117. }
  118. if(!strcmp("/Ulaz", cmdtext, true))
  119. {
  120. if(PlayerToPoint(3.0,playerid,-787.6028,607.4207,7.5498)) // Ulaz kroz balkon
  121. {
  122. SetPlayerPos(playerid,-227.027999,1401.229980,27.765625);
  123. SetPlayerFacingAngle(playerid, 356.9500);
  124. SetPlayerInterior(playerid, 18);
  125. }
  126. else if(PlayerToPoint(3.0,playerid,-791.3444,609.3802,1.4482)) // Ulaz kroz vrata
  127. {
  128. SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
  129. SetPlayerInterior(playerid, 5);
  130. }
  131. return 1;
  132. }
  133. if(!strcmp("/Izlaz", cmdtext, true))
  134. {
  135. if(PlayerToPoint(3.0,playerid,-227.027999,1401.229980,27.765625)) // Izlaz iz 2 sprata
  136. {
  137. SetPlayerPos(playerid,-787.6028,607.4207,7.5498);
  138. SetPlayerInterior(playerid, 0);
  139. }
  140. else if(PlayerToPoint(3.0,playerid,1267.663208,-781.323242,1091.906250)) // Izlaz iz 1 sprata ( Madd Dog interior )
  141. {
  142. SetPlayerPos(playerid, -791.3444,609.3802,1.4482);
  143. SetPlayerInterior(playerid, 0);
  144. }
  145. return 1;
  146. }
  147. return 0;
  148. }
  149.  
  150. public OnPlayerPickUpPickup(playerid, pickupid)
  151. {
  152. if (PlayerToPoint(3.0, playerid,-787.6028,607.4207,7.5498)) // Ulaz u Lil Probe Inn s balkona ! ( sprat 2 )
  153. {
  154. GameTextForPlayer(playerid, "Kucaj /ulaz", 5000, 1);
  155. }
  156. if (PlayerToPoint(3.0, playerid,-227.027999,1401.229980,27.765625)) // Izlaz iz Lil Probe Inn ( sprat 2 )
  157. {
  158. GameTextForPlayer(playerid, "Kucaj /izlaz", 5000, 1);
  159. }
  160. else if (PlayerToPoint(3.0, playerid, -791.3444,609.3802,1.4482)) // Ulaz u Madd Dog ( sprat 1 )
  161. {
  162. GameTextForPlayer(playerid, "Kucaj /ulaz", 5000, 1);
  163. }
  164. if (PlayerToPoint(3.0, playerid, 1267.663208,-781.323242,1091.906250)) // Izlaz iz Madd Dog ( sprat 1 )
  165. {
  166. GameTextForPlayer(playerid, "Kucaj /izlaz", 5000, 1);
  167. }
  168. return 1;
  169. }
  170.  
  171. stock strtok(const string[], &index)
  172. {
  173. new length = strlen(string);
  174. while ((index < length) && (string[index] <= ' '))
  175. {
  176. index++;
  177. }
  178.  
  179. new offset = index;
  180. new result[20];
  181. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  182. {
  183. result[index - offset] = string[index];
  184. index++;
  185. }
  186. result[index - offset] = EOS;
  187. return result;
  188. }
  189. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  190. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  191. {
  192. if(IsPlayerConnected(playerid))
  193. {
  194. new Float:oldposx, Float:oldposy, Float:oldposz;
  195. new Float:tempposx, Float:tempposy, Float:tempposz;
  196. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  197. tempposx = (oldposx -x);
  198. tempposy = (oldposy -y);
  199. tempposz = (oldposz -z);
  200. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  201. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  202. {
  203. return 1;
  204. }
  205. }
  206. return 0;
  207. }
  208.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement