unguru2009

Rob house!

Mar 4th, 2015
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 94.31 KB | None | 0 0
  1.  
  2.  
  3. #include <a_samp>
  4.  
  5. #pragma tabsize 0
  6.  
  7. #define PLAYERS 100 // Change this to whatever you use.
  8. #define TIME 1300 // animation time
  9. #define HOUSEID HouseData[playerid][idhouse]
  10. #define STEALING HouseData[playerid][stealing]
  11. #define GETDISTANCEVANTOHOUSE GetDistanceBetweenPoints(VanCheck[playerid][vehicle], 0, HouseData[playerid][exit_x],HouseData[playerid][exit_y],HouseData[playerid][exit_z])
  12. #define GETDISTANCEPLAYERTOPOINT GetDistanceBetweenPoints(playerid, 1, x,y,z)
  13. #define CURRENTITEM HouseData[playerid][currentitem]
  14. #define RESTOREWEAPONS for (new i = 0; i < 13; i++){GivePlayerWeapon(playerid, Weapons[playerid][i][0], Weapons[playerid][i][1]);}
  15. #define RAISEWNTDLVL SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
  16.  
  17. // Forward Functions
  18. forward Float:GetDistanceBetweenPoints(modelid,type,Float:x2,Float:y2,Float:z2);
  19. forward Check(playerid);
  20. forward CheckObjDrop(playerid);
  21. forward CheckDistance(playerid);
  22. forward DropCargo(playerid);
  23.  
  24. // Enums
  25. enum types
  26. {
  27. tv, // 2648
  28. Text3D:tvtag,
  29. speaker, // 1783
  30. Text3D:speakertag,
  31. video, // 2102
  32. Text3D:videotag
  33. };
  34.  
  35. enum data
  36. {
  37. // HOUSE POSITIONS
  38. Float:exit_x,
  39. Float:exit_y,
  40. Float:exit_z,
  41. Float:entr_x,
  42. Float:entr_y,
  43. Float:entr_z,
  44. Float:steal1_x,
  45. Float:steal1_y,
  46. Float:steal1_z,
  47. Float:steal2_x,
  48. Float:steal2_y,
  49. Float:steal2_z,
  50. Float:steal3_x,
  51. Float:steal3_y,
  52. Float:steal3_z,
  53. // VAN DATA
  54. vehicle,
  55. vehmodel,
  56. cargo, // TOTAL CARGO
  57. tv, // TELEVITION
  58. speaker, // SPEAKERS
  59. video, // VIDEO RECORDERS
  60. // HOUSE DATA
  61. idhouse,
  62. stealing,
  63. currentitem
  64. };
  65. // Arrays
  66. new StealObjs[PLAYERS][types];
  67. new HouseData[PLAYERS][data];
  68. new Weapons[PLAYERS][13][2];
  69. new GlobalHouses[100];
  70. new VanCheck[PLAYERS][data];
  71. new Timers[PLAYERS][4];
  72.  
  73. // -----------------------------------------------------------------------------
  74.  
  75. public OnFilterScriptInit()
  76. {
  77. // HOUSES
  78. Create3DTextLabel("Steal house",0x008080FF,893.6293,-1635.6991,14.9297,30.0,0,1); // Regular House 0
  79. Create3DTextLabel("Steal house",0x008080FF,877.9787,-1515.0007,14.3472,30.0,0,1); // Regular House 1
  80. Create3DTextLabel("Steal house",0x008080FF,850.3426,-1520.1302,14.1556,30.0,0,1); // Regular House 2
  81. Create3DTextLabel("Steal house",0x008080FF,772.2767,-1511.0217,13.5469,30.0,0,1); // Regular House 3
  82. Create3DTextLabel("Steal house",0x008080FF,766.9218,-1605.8341,13.8039,30.0,0,1); // Regular House 4
  83. Create3DTextLabel("Steal house",0x008080FF,768.0768,-1655.7711,5.6094,30.0,0,1); // Regular House 5
  84. Create3DTextLabel("Steal house",0x008080FF,769.2180,-1696.5428,5.1554,30.0,0,1); // Regular House 6
  85. Create3DTextLabel("Steal house",0x008080FF,769.2269,-1745.9491,13.0773,30.0,0,1); // Regular House 7
  86. Create3DTextLabel("Steal house",0x008080FF,769.0789,-1726.2399,13.4321,30.0,0,1); // Regular House 8
  87. Create3DTextLabel("Steal house",0x008080FF,769.2269,-1745.9491,13.0773,30.0,0,1); // Regular House 9
  88. Create3DTextLabel("Steal house",0x008080FF,769.0789,-1726.2399,13.4321,30.0,0,1); // Regular House 10
  89. Create3DTextLabel("Steal house",0x008080FF,693.5486,-1705.9419,3.8195,30.0,0,1); // Regular House 11
  90. Create3DTextLabel("Steal house",0x008080FF,694.7153,-1690.7299,4.3461,30.0,0,1); // Regular House 12
  91. Create3DTextLabel("Steal house",0x008080FF,657.2186,-1652.5876,15.4063,30.0,0,1); // Regular House 13
  92. Create3DTextLabel("Steal house",0x008080FF,1103.3270,-1092.3955,28.4688,30.0,0,1); // Regular House 14
  93. Create3DTextLabel("Steal house",0x008080FF,1068.4271,-1081.3989,27.5257,30.0,0,1); // Regular House 15
  94. Create3DTextLabel("Steal house",0x008080FF,1117.9961,-1021.7153,34.9922,30.0,0,1); // Regular House 16
  95. Create3DTextLabel("Steal house",0x008080FF,1234.7405,-1016.2308,36.3359,30.0,0,1); // Regular House 17
  96. Create3DTextLabel("Steal house",0x008080FF,1284.8151,-1097.9276,25.9003,30.0,0,1); // Regular House 18
  97. Create3DTextLabel("Steal house",0x008080FF,1410.5220,-920.7756,38.4219,30.0,0,1); // Regular House 19
  98. Create3DTextLabel("Steal house",0x008080FF,1242.5571,-878.2666,46.6406,30.0,0,1); // Regular House 20
  99. Create3DTextLabel("Steal house",0x008080FF,1283.5397,-897.8742,42.8753,30.0,0,1); // Regular House 21
  100.  
  101. return 1;
  102. }
  103.  
  104. public OnFilterScriptExit()
  105. {
  106.  
  107. for(new i=0;i<100;i++)
  108. {
  109. if(!IsPlayerConnected(i) || !IsPlayerNPC(i))
  110. {
  111. DestroyObject(StealObjs[i][video]);
  112. DestroyObject(StealObjs[i][speaker]);
  113. DestroyObject(StealObjs[i][tv]);
  114. Delete3DTextLabel(StealObjs[i][tvtag]);
  115. Delete3DTextLabel(StealObjs[i][videotag]);
  116. Delete3DTextLabel(StealObjs[i][speakertag]);
  117. VanCheck[i][vehicle] = -1;
  118. VanCheck[i][vehmodel] = -1;
  119. VanCheck[i][tv] = 0;
  120. VanCheck[i][video] = 0;
  121. VanCheck[i][speaker] = 0;
  122. VanCheck[i][cargo] = 0;
  123. GlobalHouses[i] = 0;
  124. RemovePlayerMapIcon( i, 96 );
  125. }
  126. }
  127.  
  128. return 1;
  129. }
  130.  
  131. // -----------------------------------------------------------------------------
  132.  
  133. public OnPlayerSpawn(playerid)
  134. {
  135. if(IsPlayerNPC(playerid))
  136. return 1;
  137.  
  138. SetPlayerMapIcon( playerid, 1, 1111.2129,-1330.6729,13.1730, 23, 0 );
  139.  
  140. // Reset Everything
  141. HouseData[playerid][idhouse] = -1;
  142. HouseData[playerid][stealing] = 0;
  143. DestroyObject(StealObjs[playerid][video]);
  144. DestroyObject(StealObjs[playerid][speaker]);
  145. DestroyObject(StealObjs[playerid][tv]);
  146. Delete3DTextLabel(StealObjs[playerid][tvtag]);
  147. Delete3DTextLabel(StealObjs[playerid][videotag]);
  148. Delete3DTextLabel(StealObjs[playerid][speakertag]);
  149. VanCheck[playerid][vehicle] = -1;
  150. VanCheck[playerid][vehmodel] = -1;
  151. VanCheck[playerid][tv] = 0;
  152. VanCheck[playerid][video] = 0;
  153. VanCheck[playerid][speaker] = 0;
  154. VanCheck[playerid][cargo] = 0;
  155.  
  156. return 1;
  157. }
  158.  
  159. public OnPlayerStateChange(playerid, newstate, oldstate)
  160. {
  161. if(IsPlayerNPC(playerid))
  162. return 1;
  163.  
  164. // CHECK IF WE DRIVE A BOXCAR
  165. if(newstate == PLAYER_STATE_DRIVER)
  166. {
  167. new vehicleid = GetPlayerVehicleID(playerid);
  168.  
  169. if(GetVehicleModel(vehicleid) == 609)
  170. {
  171. if(VanCheck[playerid][vehmodel] != 609)
  172. GameTextForPlayer(playerid,"~b~~h~~h~You can use this~n~~b~~h~~h~vehicle to steal houses!",3000,4);
  173.  
  174. VanCheck[playerid][vehmodel] = 609;
  175. VanCheck[playerid][vehicle] = vehicleid;
  176.  
  177. if(VanCheck[playerid][cargo] > 0)
  178. {
  179. STEALING = 0;
  180. HOUSEID = -1;
  181. GameTextForPlayer(playerid,"~b~~h~~h~Take your cargo~n~~b~~h~~h~to blue skull",3000,4);
  182. }
  183. }
  184. else VanCheck[playerid][vehmodel] = -1;
  185.  
  186.  
  187. }
  188. return 1;
  189. }
  190.  
  191. public OnPlayerCommandText(playerid, cmdtext[])
  192. {
  193. new Float:x,Float:y,Float:z;
  194. GetVehiclePos(VanCheck[playerid][vehicle], x,y,z);
  195.  
  196. new cmd[128], idx;
  197. cmd = strtok(cmdtext, idx);
  198.  
  199. if (strcmp("/cargo", cmdtext, true, 6) == 0)
  200. {
  201. if(GETDISTANCEPLAYERTOPOINT <= 10)
  202. {
  203. new string[128];
  204. format(string,sizeof(string)," Carga total: %i/3\n\nTelevitions: %i\n\nStereos: %i\n\nTaperecorders: %i\n", VanCheck[playerid][cargo],VanCheck[playerid][tv],VanCheck[playerid][speaker],VanCheck[playerid][video]);
  205. return ShowPlayerDialog(playerid,1000,0,"Boxcar",string,"Accept","Cancel");
  206.  
  207. }
  208. return GameTextForPlayer(playerid,"~w~You must be close~n~~w~to your boxcar!",1500,4);
  209. }
  210. return 0;
  211. }
  212.  
  213. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  214. {
  215. /*if(!(GetPlayerSkin(playerid) >= 0 && GetPlayerSkin(playerid) < 280)) // Only TEAM 1 can use this script
  216. return 1;*/
  217.  
  218. if(newkeys == KEY_LOOK_BEHIND) // Press Look Behind to enter houses
  219. {
  220. if(IsPlayerInRangeOfPoint(playerid, 1.0, 893.6293,-1635.6991,14.9297)) // HOUSE 0
  221. {
  222. if(GlobalHouses[0] == 1 && HOUSEID != 0)
  223. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  224.  
  225. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  226. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  227.  
  228. if(STEALING && HOUSEID != 0) // Check if we are stealing the same house we begin with
  229. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  230.  
  231. if(!STEALING)RAISEWNTDLVL
  232.  
  233. // SET PLAYER INSIDE
  234. SetPlayerInterior(playerid, 15);
  235. SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961 );
  236. SetPlayerVirtualWorld(playerid, 1);
  237. // CREATE THE OBJECTS
  238. if(!STEALING)
  239. {
  240. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
  241. StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
  242.  
  243. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
  244. StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
  245.  
  246. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
  247. StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
  248. }
  249. // GATHER DATA
  250. HouseData[playerid][exit_x] = 893.6293;
  251. HouseData[playerid][exit_y] = -1635.6991;
  252. HouseData[playerid][exit_z] = 14.9297;
  253. HouseData[playerid][entr_x] = 385.803986;
  254. HouseData[playerid][entr_y] = 1471.769897;
  255. HouseData[playerid][entr_z] = 1080.209961;
  256.  
  257. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  258. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  259. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  260.  
  261. // SET WHAT HOUSE WE STEAL
  262. HouseData[playerid][idhouse] = 0; // id of the house
  263. GlobalHouses[0] = 1; // Declare we are robing house 0
  264.  
  265. }
  266. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 877.9787,-1515.0007,14.3472)) // HOUSE 1
  267. {
  268. if(GlobalHouses[1] == 1 && HOUSEID != 1)
  269. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  270.  
  271. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  272. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  273.  
  274. if(STEALING && HOUSEID != 1) // Check if we are stealing the same house we begin with
  275. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  276.  
  277. if(!STEALING)RAISEWNTDLVL
  278.  
  279. // SET PLAYER INSIDE
  280. SetPlayerInterior(playerid, 15);
  281. SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
  282. SetPlayerVirtualWorld(playerid, 1);
  283. // CREATE THE OBJECTS
  284. if(!STEALING)
  285. {
  286. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
  287. StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
  288.  
  289. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
  290. StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
  291.  
  292. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
  293. StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
  294. }
  295. // GATHER DATA
  296. HouseData[playerid][exit_x] = 877.9787;
  297. HouseData[playerid][exit_y] = -1515.0007;
  298. HouseData[playerid][exit_z] = 14.3472;
  299. HouseData[playerid][entr_x] = 327.7443;
  300. HouseData[playerid][entr_y] = 1478.0784;
  301. HouseData[playerid][entr_z] = 1084.4375;
  302.  
  303. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  304. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  305. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  306.  
  307. // SET WHAT HOUSE WE STEAL
  308. HouseData[playerid][idhouse] = 1; // id of the house
  309. GlobalHouses[1] = 1; // Declare we are robing house 1
  310.  
  311. }
  312. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 850.3426,-1520.1302,14.1556)) // HOUSE 2
  313. {
  314. if(GlobalHouses[2] == 1 && HOUSEID != 2)
  315. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  316.  
  317. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  318. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  319.  
  320. if(STEALING && HOUSEID != 2) // Check if we are stealing the same house we begin with
  321. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  322.  
  323. if(!STEALING)RAISEWNTDLVL
  324.  
  325. // SET PLAYER INSIDE
  326. SetPlayerInterior(playerid, 15);
  327. SetPlayerPos(playerid, 295.138977,1474.469971,1080.519897 );
  328. SetPlayerVirtualWorld(playerid, 1);
  329. // CREATE THE OBJECTS
  330. if(!STEALING)
  331. {
  332. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,292.2426,1487.3580,1080.5,10.0,1,1);
  333. StealObjs[playerid][tv] = CreateObject( 2648, 292.2426,1487.3580,1080.0, 0, 0, 175 ); // 2648
  334.  
  335. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,297.8346,1475.6444,1081.2,10.0,1,1);
  336. StealObjs[playerid][video] = CreateObject( 1783, 297.8346,1475.6444,1080.6, 0, 0, 110 ); // 1783
  337.  
  338. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,289.5742,1489.8972,1080.5,10.0,1,1);
  339. StealObjs[playerid][speaker] = CreateObject( 2102, 290.0,1489.8,1080.0, 0, 0, 0 ); // 2102
  340. }
  341. // GATHER DATA
  342. HouseData[playerid][exit_x] = 850.3426;
  343. HouseData[playerid][exit_y] = -1520.1302;
  344. HouseData[playerid][exit_z] = 14.1556;
  345. HouseData[playerid][entr_x] = 295.1858;
  346. HouseData[playerid][entr_y] = 1472.2568;
  347. HouseData[playerid][entr_z] = 1080.2578;
  348.  
  349. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  350. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  351. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  352.  
  353. // SET WHAT HOUSE WE STEAL
  354. HouseData[playerid][idhouse] = 2; // id of the house
  355. GlobalHouses[2] = 1; // Declare we are robing house 2
  356.  
  357. }
  358. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 772.2767,-1511.0217,13.5469)) // HOUSE 3
  359. {
  360. if(GlobalHouses[3] == 1 && HOUSEID != 3)
  361. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  362.  
  363. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  364. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  365.  
  366. if(STEALING && HOUSEID != 3) // Check if we are stealing the same house we begin with
  367. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  368.  
  369. if(!STEALING)RAISEWNTDLVL
  370.  
  371. // SET PLAYER INSIDE
  372. SetPlayerInterior(playerid, 1);
  373. SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
  374. SetPlayerVirtualWorld(playerid, 1);
  375. // CREATE THE OBJECTS
  376. if(!STEALING)
  377. {
  378. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
  379. StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
  380.  
  381. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
  382. StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
  383.  
  384. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
  385. StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
  386. }
  387. // GATHER DATA
  388. HouseData[playerid][exit_x] = 772.2767;
  389. HouseData[playerid][exit_y] = -1511.0217;
  390. HouseData[playerid][exit_z] = 13.5469;
  391. HouseData[playerid][entr_x] = 222.9946;
  392. HouseData[playerid][entr_y] = 1287.0769;
  393. HouseData[playerid][entr_z] = 1082.1406;
  394.  
  395. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  396. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  397. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  398.  
  399. // SET WHAT HOUSE WE STEAL
  400. HouseData[playerid][idhouse] = 3; // id of the house
  401. GlobalHouses[3] = 1; // Declare we are robing house 3
  402.  
  403. }
  404. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 766.9218,-1605.8341,13.8039)) // HOUSE 4
  405. {
  406. if(GlobalHouses[4] == 1 && HOUSEID != 4)
  407. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  408.  
  409. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  410. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  411.  
  412. if(STEALING && HOUSEID != 4) // Check if we are stealing the same house we begin with
  413. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  414.  
  415. if(!STEALING)RAISEWNTDLVL
  416.  
  417. // SET PLAYER INSIDE
  418. SetPlayerInterior(playerid, 1);
  419. SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
  420. SetPlayerVirtualWorld(playerid, 1);
  421. // CREATE THE OBJECTS
  422. if(!STEALING)
  423. {
  424. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
  425. StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
  426.  
  427. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
  428. StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
  429.  
  430. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
  431. StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
  432. }
  433. // GATHER DATA
  434. HouseData[playerid][exit_x] = 766.9218;
  435. HouseData[playerid][exit_y] = -1605.8341;
  436. HouseData[playerid][exit_z] = 13.8039;
  437. HouseData[playerid][entr_x] = 222.9946;
  438. HouseData[playerid][entr_y] = 1287.0769;
  439. HouseData[playerid][entr_z] = 1082.1406;
  440.  
  441. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  442. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  443. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  444.  
  445. // SET WHAT HOUSE WE STEAL
  446. HouseData[playerid][idhouse] = 4; // id of the house
  447. GlobalHouses[4] = 1; // Declare we are robing house 4
  448.  
  449. }
  450. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 768.0768,-1655.7711,5.6094)) // HOUSE 5
  451. {
  452. if(GlobalHouses[5] == 1 && HOUSEID != 5)
  453. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  454.  
  455. //if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  456. // return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  457.  
  458. if(STEALING && HOUSEID != 5) // Check if we are stealing the same house we begin with
  459. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  460.  
  461. if(!STEALING)RAISEWNTDLVL
  462.  
  463. // SET PLAYER INSIDE
  464. SetPlayerInterior(playerid, 15);
  465. SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961);
  466. SetPlayerVirtualWorld(playerid, 1);
  467. // CREATE THE OBJECTS
  468. if(!STEALING)
  469. {
  470. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
  471. StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
  472.  
  473. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
  474. StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
  475.  
  476. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
  477. StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
  478. }
  479. // GATHER DATA
  480. HouseData[playerid][exit_x] = 768.0768;
  481. HouseData[playerid][exit_y] = -1655.7711;
  482. HouseData[playerid][exit_z] = 5.6094;
  483. HouseData[playerid][entr_x] = 385.803986;
  484. HouseData[playerid][entr_y] = 1471.769897;
  485. HouseData[playerid][entr_z] = 1080.209961;
  486.  
  487. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  488. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  489. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  490.  
  491. // SET WHAT HOUSE WE STEAL
  492. HouseData[playerid][idhouse] = 5; // id of the house
  493. GlobalHouses[5] = 1; // Declare we are robing house 5
  494.  
  495. }
  496. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 769.2180,-1696.5428,5.1554)) // HOUSE 6
  497. {
  498. if(GlobalHouses[6] == 1 && HOUSEID != 6)
  499. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  500.  
  501. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  502. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  503.  
  504. if(STEALING && HOUSEID != 6) // Check if we are stealing the same house we begin with
  505. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  506.  
  507. if(!STEALING)RAISEWNTDLVL
  508.  
  509. // SET PLAYER INSIDE
  510. SetPlayerInterior(playerid, 15);
  511. SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
  512. SetPlayerVirtualWorld(playerid, 1);
  513. // CREATE THE OBJECTS
  514. if(!STEALING)
  515. {
  516. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
  517. StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
  518.  
  519. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
  520. StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
  521.  
  522. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
  523. StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
  524. }
  525. // GATHER DATA
  526. HouseData[playerid][exit_x] = 769.2180;
  527. HouseData[playerid][exit_y] = -1696.5428;
  528. HouseData[playerid][exit_z] = 5.1554;
  529. HouseData[playerid][entr_x] = 327.7443;
  530. HouseData[playerid][entr_y] = 1478.0784;
  531. HouseData[playerid][entr_z] = 1084.4375;
  532.  
  533. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  534. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  535. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  536.  
  537. // SET WHAT HOUSE WE STEAL
  538. HouseData[playerid][idhouse] = 6; // id of the house
  539. GlobalHouses[1] = 6; // Declare we are robing house 6
  540.  
  541. }
  542. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 769.2269,-1745.9491,13.0773)) // HOUSE 7
  543. {
  544. if(GlobalHouses[7] == 1 && HOUSEID != 7)
  545. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  546.  
  547. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  548. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  549.  
  550. if(STEALING && HOUSEID != 7) // Check if we are stealing the same house we begin with
  551. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  552.  
  553. if(!STEALING)RAISEWNTDLVL
  554.  
  555. // SET PLAYER INSIDE
  556. SetPlayerInterior(playerid, 1);
  557. SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
  558. SetPlayerVirtualWorld(playerid, 1);
  559. // CREATE THE OBJECTS
  560. if(!STEALING)
  561. {
  562. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
  563. StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
  564.  
  565. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
  566. StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
  567.  
  568. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
  569. StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
  570. }
  571. // GATHER DATA
  572. HouseData[playerid][exit_x] = 769.2269;
  573. HouseData[playerid][exit_y] = -1745.9491;
  574. HouseData[playerid][exit_z] = 13.0773;
  575. HouseData[playerid][entr_x] = 222.9946;
  576. HouseData[playerid][entr_y] = 1287.0769;
  577. HouseData[playerid][entr_z] = 1082.1406;
  578.  
  579. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  580. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  581. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  582.  
  583. // SET WHAT HOUSE WE STEAL
  584. HouseData[playerid][idhouse] = 7; // id of the house
  585. GlobalHouses[7] = 1; // Declare we are robing house 7
  586.  
  587. }
  588. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 769.0789,-1726.2399,13.4321)) // HOUSE 8
  589. {
  590. if(GlobalHouses[8] == 1 && HOUSEID != 4)
  591. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  592.  
  593. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  594. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  595.  
  596. if(STEALING && HOUSEID != 8) // Check if we are stealing the same house we begin with
  597. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  598.  
  599. if(!STEALING)RAISEWNTDLVL
  600.  
  601. // SET PLAYER INSIDE
  602. SetPlayerInterior(playerid, 1);
  603. SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
  604. SetPlayerVirtualWorld(playerid, 1);
  605. // CREATE THE OBJECTS
  606. if(!STEALING)
  607. {
  608. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
  609. StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
  610.  
  611. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
  612. StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
  613.  
  614. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
  615. StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
  616. }
  617. // GATHER DATA
  618. HouseData[playerid][exit_x] = 769.0789;
  619. HouseData[playerid][exit_y] = -1726.2399;
  620. HouseData[playerid][exit_z] = 13.4321;
  621. HouseData[playerid][entr_x] = 222.9946;
  622. HouseData[playerid][entr_y] = 1287.0769;
  623. HouseData[playerid][entr_z] = 1082.1406;
  624.  
  625. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  626. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  627. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  628.  
  629. // SET WHAT HOUSE WE STEAL
  630. HouseData[playerid][idhouse] = 8; // id of the house
  631. GlobalHouses[8] = 1; // Declare we are robing house 8
  632.  
  633. }
  634. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 693.5486,-1705.9419,3.8195)) // HOUSE 9
  635. {
  636. if(GlobalHouses[9] == 1 && HOUSEID != 0)
  637. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  638.  
  639. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  640. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  641.  
  642. if(STEALING && HOUSEID != 9) // Check if we are stealing the same house we begin with
  643. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  644.  
  645. if(!STEALING)RAISEWNTDLVL
  646.  
  647. // SET PLAYER INSIDE
  648. SetPlayerInterior(playerid, 15);
  649. SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961 );
  650. SetPlayerVirtualWorld(playerid, 1);
  651. // CREATE THE OBJECTS
  652. if(!STEALING)
  653. {
  654. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
  655. StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
  656.  
  657. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
  658. StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
  659.  
  660. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
  661. StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
  662. }
  663. // GATHER DATA
  664. HouseData[playerid][exit_x] = 693.5486;
  665. HouseData[playerid][exit_y] = -1705.9419;
  666. HouseData[playerid][exit_z] = 3.8195;
  667. HouseData[playerid][entr_x] = 385.803986;
  668. HouseData[playerid][entr_y] = 1471.769897;
  669. HouseData[playerid][entr_z] = 1080.209961;
  670.  
  671. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  672. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  673. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  674.  
  675. // SET WHAT HOUSE WE STEAL
  676. HouseData[playerid][idhouse] = 9; // id of the house
  677. GlobalHouses[9] = 1; // Declare we are robing house 9
  678.  
  679. }
  680. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 694.7153,-1690.7299,4.3461)) // HOUSE 10
  681. {
  682. if(GlobalHouses[10] == 1 && HOUSEID != 1)
  683. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  684.  
  685. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  686. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  687.  
  688. if(STEALING && HOUSEID != 10) // Check if we are stealing the same house we begin with
  689. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  690.  
  691. if(!STEALING)RAISEWNTDLVL
  692.  
  693. // SET PLAYER INSIDE
  694. SetPlayerInterior(playerid, 15);
  695. SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
  696. SetPlayerVirtualWorld(playerid, 1);
  697. // CREATE THE OBJECTS
  698. if(!STEALING)
  699. {
  700. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
  701. StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
  702.  
  703. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
  704. StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
  705.  
  706. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
  707. StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
  708. }
  709. // GATHER DATA
  710. HouseData[playerid][exit_x] = 694.7153;
  711. HouseData[playerid][exit_y] = -1690.7299;
  712. HouseData[playerid][exit_z] = 4.3461;
  713. HouseData[playerid][entr_x] = 327.7443;
  714. HouseData[playerid][entr_y] = 1478.0784;
  715. HouseData[playerid][entr_z] = 1084.4375;
  716.  
  717. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  718. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  719. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  720.  
  721. // SET WHAT HOUSE WE STEAL
  722. HouseData[playerid][idhouse] = 10; // id of the house
  723. GlobalHouses[10] = 1; // Declare we are robing house 10
  724.  
  725. }
  726. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 693.7615,-1645.9271,4.0938)) // HOUSE 11
  727. {
  728. if(GlobalHouses[11] == 1 && HOUSEID != 2)
  729. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  730.  
  731. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  732. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  733.  
  734. if(STEALING && HOUSEID != 11) // Check if we are stealing the same house we begin with
  735. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  736.  
  737. if(!STEALING)RAISEWNTDLVL
  738.  
  739. // SET PLAYER INSIDE
  740. SetPlayerInterior(playerid, 15);
  741. SetPlayerPos(playerid, 295.138977,1474.469971,1080.519897 );
  742. SetPlayerVirtualWorld(playerid, 1);
  743. // CREATE THE OBJECTS
  744. if(!STEALING)
  745. {
  746. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,292.2426,1487.3580,1080.5,10.0,1,1);
  747. StealObjs[playerid][tv] = CreateObject( 2648, 292.2426,1487.3580,1080.0, 0, 0, 175 ); // 2648
  748.  
  749. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,297.8346,1475.6444,1081.2,10.0,1,1);
  750. StealObjs[playerid][video] = CreateObject( 1783, 297.8346,1475.6444,1080.6, 0, 0, 110 ); // 1783
  751.  
  752. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,289.5742,1489.8972,1080.5,10.0,1,1);
  753. StealObjs[playerid][speaker] = CreateObject( 2102, 290.0,1489.8,1080.0, 0, 0, 0 ); // 2102
  754. }
  755. // GATHER DATA
  756. HouseData[playerid][exit_x] = 693.7615;
  757. HouseData[playerid][exit_y] = -1645.9271;
  758. HouseData[playerid][exit_z] = 4.0938;
  759. HouseData[playerid][entr_x] = 295.1858;
  760. HouseData[playerid][entr_y] = 1472.2568;
  761. HouseData[playerid][entr_z] = 1080.2578;
  762.  
  763. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  764. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  765. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  766.  
  767. // SET WHAT HOUSE WE STEAL
  768. HouseData[playerid][idhouse] = 11; // id of the house
  769. GlobalHouses[11] = 1; // Declare we are robing house 11
  770.  
  771. }
  772. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 697.2795,-1627.1449,3.7492)) // HOUSE 12
  773. {
  774. if(GlobalHouses[12] == 1 && HOUSEID != 3)
  775. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  776.  
  777. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  778. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  779.  
  780. if(STEALING && HOUSEID != 12) // Check if we are stealing the same house we begin with
  781. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  782.  
  783. if(!STEALING)RAISEWNTDLVL
  784.  
  785. // SET PLAYER INSIDE
  786. SetPlayerInterior(playerid, 1);
  787. SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
  788. SetPlayerVirtualWorld(playerid, 1);
  789. // CREATE THE OBJECTS
  790. if(!STEALING)
  791. {
  792. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
  793. StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
  794.  
  795. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
  796. StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
  797.  
  798. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
  799. StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
  800. }
  801. // GATHER DATA
  802. HouseData[playerid][exit_x] = 697.2795;
  803. HouseData[playerid][exit_y] = -1627.1449;
  804. HouseData[playerid][exit_z] = 3.7492;
  805. HouseData[playerid][entr_x] = 222.9946;
  806. HouseData[playerid][entr_y] = 1287.0769;
  807. HouseData[playerid][entr_z] = 1082.1406;
  808.  
  809. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  810. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  811. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  812.  
  813. // SET WHAT HOUSE WE STEAL
  814. HouseData[playerid][idhouse] = 12; // id of the house
  815. GlobalHouses[12] = 1; // Declare we are robing house 12
  816.  
  817. }
  818. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 657.2186,-1652.5876,15.4063)) // HOUSE 13
  819. {
  820. if(GlobalHouses[13] == 1 && HOUSEID != 13)
  821. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  822.  
  823. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  824. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  825.  
  826. if(STEALING && HOUSEID != 13) // Check if we are stealing the same house we begin with
  827. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  828.  
  829. if(!STEALING)RAISEWNTDLVL
  830.  
  831. // SET PLAYER INSIDE
  832. SetPlayerInterior(playerid, 1);
  833. SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
  834. SetPlayerVirtualWorld(playerid, 1);
  835. // CREATE THE OBJECTS
  836. if(!STEALING)
  837. {
  838. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
  839. StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
  840.  
  841. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
  842. StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
  843.  
  844. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
  845. StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
  846. }
  847. // GATHER DATA
  848. HouseData[playerid][exit_x] = 657.2186;
  849. HouseData[playerid][exit_y] = -1652.5876;
  850. HouseData[playerid][exit_z] = 15.4063;
  851. HouseData[playerid][entr_x] = 222.9946;
  852. HouseData[playerid][entr_y] = 1287.0769;
  853. HouseData[playerid][entr_z] = 1082.1406;
  854.  
  855. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  856. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  857. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  858.  
  859. // SET WHAT HOUSE WE STEAL
  860. HouseData[playerid][idhouse] = 13; // id of the house
  861. GlobalHouses[13] = 1; // Declare we are robing house 13
  862.  
  863. }
  864. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1103.3270,-1092.3955,28.4688)) // HOUSE 14
  865. {
  866. if(GlobalHouses[14] == 1 && HOUSEID != 0)
  867. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  868.  
  869. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  870. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  871.  
  872. if(STEALING && HOUSEID != 14) // Check if we are stealing the same house we begin with
  873. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  874.  
  875. if(!STEALING)RAISEWNTDLVL
  876.  
  877. // SET PLAYER INSIDE
  878. SetPlayerInterior(playerid, 15);
  879. SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961 );
  880. SetPlayerVirtualWorld(playerid, 1);
  881. // CREATE THE OBJECTS
  882. if(!STEALING)
  883. {
  884. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
  885. StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
  886.  
  887. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
  888. StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
  889.  
  890. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
  891. StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
  892. }
  893. // GATHER DATA
  894. HouseData[playerid][exit_x] = 1103.3270;
  895. HouseData[playerid][exit_y] = -1092.3955;
  896. HouseData[playerid][exit_z] = 28.4688;
  897. HouseData[playerid][entr_x] = 385.803986;
  898. HouseData[playerid][entr_y] = 1471.769897;
  899. HouseData[playerid][entr_z] = 1080.209961;
  900.  
  901. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  902. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  903. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  904.  
  905. // SET WHAT HOUSE WE STEAL
  906. HouseData[playerid][idhouse] = 14; // id of the house
  907. GlobalHouses[14] = 1; // Declare we are robing house 14
  908.  
  909. }
  910. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1068.4271,-1081.3989,27.5257)) // HOUSE 15
  911. {
  912. if(GlobalHouses[15] == 1 && HOUSEID != 1)
  913. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  914.  
  915. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  916. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  917.  
  918. if(STEALING && HOUSEID != 15) // Check if we are stealing the same house we begin with
  919. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  920.  
  921. if(!STEALING)RAISEWNTDLVL
  922.  
  923. // SET PLAYER INSIDE
  924. SetPlayerInterior(playerid, 15);
  925. SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
  926. SetPlayerVirtualWorld(playerid, 1);
  927. // CREATE THE OBJECTS
  928. if(!STEALING)
  929. {
  930. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
  931. StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
  932.  
  933. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
  934. StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
  935.  
  936. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
  937. StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
  938. }
  939. // GATHER DATA
  940. HouseData[playerid][exit_x] = 1068.4271;
  941. HouseData[playerid][exit_y] = -1081.3989;
  942. HouseData[playerid][exit_z] = 27.5257;
  943. HouseData[playerid][entr_x] = 327.7443;
  944. HouseData[playerid][entr_y] = 1478.0784;
  945. HouseData[playerid][entr_z] = 1084.4375;
  946.  
  947. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  948. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  949. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  950.  
  951. // SET WHAT HOUSE WE STEAL
  952. HouseData[playerid][idhouse] = 15; // id of the house
  953. GlobalHouses[15] = 1; // Declare we are robing house 15
  954.  
  955. }
  956. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1117.9961,-1021.7153,34.9922)) // HOUSE 16
  957. {
  958. if(GlobalHouses[16] == 1 && HOUSEID != 2)
  959. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  960.  
  961. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  962. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  963.  
  964. if(STEALING && HOUSEID != 16) // Check if we are stealing the same house we begin with
  965. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  966.  
  967. if(!STEALING)RAISEWNTDLVL
  968.  
  969. // SET PLAYER INSIDE
  970. SetPlayerInterior(playerid, 15);
  971. SetPlayerPos(playerid, 295.138977,1474.469971,1080.519897 );
  972. SetPlayerVirtualWorld(playerid, 1);
  973. // CREATE THE OBJECTS
  974. if(!STEALING)
  975. {
  976. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,292.2426,1487.3580,1080.5,10.0,1,1);
  977. StealObjs[playerid][tv] = CreateObject( 2648, 292.2426,1487.3580,1080.0, 0, 0, 175 ); // 2648
  978.  
  979. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,297.8346,1475.6444,1081.2,10.0,1,1);
  980. StealObjs[playerid][video] = CreateObject( 1783, 297.8346,1475.6444,1080.6, 0, 0, 110 ); // 1783
  981.  
  982. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,289.5742,1489.8972,1080.5,10.0,1,1);
  983. StealObjs[playerid][speaker] = CreateObject( 2102, 290.0,1489.8,1080.0, 0, 0, 0 ); // 2102
  984. }
  985. // GATHER DATA
  986. HouseData[playerid][exit_x] = 1117.9961;
  987. HouseData[playerid][exit_y] = -1021.7153;
  988. HouseData[playerid][exit_z] = 34.9922;
  989. HouseData[playerid][entr_x] = 295.1858;
  990. HouseData[playerid][entr_y] = 1472.2568;
  991. HouseData[playerid][entr_z] = 1080.2578;
  992.  
  993. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  994. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  995. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  996.  
  997. // SET WHAT HOUSE WE STEAL
  998. HouseData[playerid][idhouse] = 16; // id of the house
  999. GlobalHouses[16] = 1; // Declare we are robing house 16
  1000.  
  1001. }
  1002. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1234.7405,-1016.2308,36.3359)) // HOUSE 17
  1003. {
  1004. if(GlobalHouses[17] == 1 && HOUSEID != 3)
  1005. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  1006.  
  1007. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  1008. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  1009.  
  1010. if(STEALING && HOUSEID != 17) // Check if we are stealing the same house we begin with
  1011. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  1012.  
  1013. if(!STEALING)RAISEWNTDLVL
  1014.  
  1015. // SET PLAYER INSIDE
  1016. SetPlayerInterior(playerid, 1);
  1017. SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
  1018. SetPlayerVirtualWorld(playerid, 1);
  1019. // CREATE THE OBJECTS
  1020. if(!STEALING)
  1021. {
  1022. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
  1023. StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
  1024.  
  1025. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
  1026. StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
  1027.  
  1028. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
  1029. StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
  1030. }
  1031. // GATHER DATA
  1032. HouseData[playerid][exit_x] = 1234.7405;
  1033. HouseData[playerid][exit_y] = -1016.2308;
  1034. HouseData[playerid][exit_z] = 36.3359;
  1035. HouseData[playerid][entr_x] = 222.9946;
  1036. HouseData[playerid][entr_y] = 1287.0769;
  1037. HouseData[playerid][entr_z] = 1082.1406;
  1038.  
  1039. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  1040. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  1041. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  1042.  
  1043. // SET WHAT HOUSE WE STEAL
  1044. HouseData[playerid][idhouse] = 17; // id of the house
  1045. GlobalHouses[17] = 1; // Declare we are robing house 17
  1046.  
  1047. }
  1048. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1284.8151,-1097.9276,25.9003)) // HOUSE 18
  1049. {
  1050. if(GlobalHouses[18] == 1 && HOUSEID != 0)
  1051. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  1052.  
  1053. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  1054. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  1055.  
  1056. if(STEALING && HOUSEID != 18) // Check if we are stealing the same house we begin with
  1057. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  1058.  
  1059. if(!STEALING)RAISEWNTDLVL
  1060.  
  1061. // SET PLAYER INSIDE
  1062. SetPlayerInterior(playerid, 15);
  1063. SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961 );
  1064. SetPlayerVirtualWorld(playerid, 1);
  1065. // CREATE THE OBJECTS
  1066. if(!STEALING)
  1067. {
  1068. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
  1069. StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
  1070.  
  1071. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
  1072. StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
  1073.  
  1074. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
  1075. StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
  1076. }
  1077. // GATHER DATA
  1078. HouseData[playerid][exit_x] = 1284.8151;
  1079. HouseData[playerid][exit_y] = -1097.9276;
  1080. HouseData[playerid][exit_z] = 25.9003;
  1081. HouseData[playerid][entr_x] = 385.803986;
  1082. HouseData[playerid][entr_y] = 1471.769897;
  1083. HouseData[playerid][entr_z] = 1080.209961;
  1084.  
  1085. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  1086. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  1087. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  1088.  
  1089. // SET WHAT HOUSE WE STEAL
  1090. HouseData[playerid][idhouse] = 18; // id of the house
  1091. GlobalHouses[18] = 1; // Declare we are robing house 18
  1092.  
  1093. }
  1094. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1410.5220,-920.7756,38.4219)) // HOUSE 19
  1095. {
  1096. if(GlobalHouses[19] == 1 && HOUSEID != 1)
  1097. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  1098.  
  1099. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  1100. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  1101.  
  1102. if(STEALING && HOUSEID != 19) // Check if we are stealing the same house we begin with
  1103. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  1104.  
  1105. if(!STEALING)RAISEWNTDLVL
  1106.  
  1107. // SET PLAYER INSIDE
  1108. SetPlayerInterior(playerid, 15);
  1109. SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
  1110. SetPlayerVirtualWorld(playerid, 1);
  1111. // CREATE THE OBJECTS
  1112. if(!STEALING)
  1113. {
  1114. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
  1115. StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
  1116.  
  1117. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
  1118. StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
  1119.  
  1120. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
  1121. StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
  1122. }
  1123. // GATHER DATA
  1124. HouseData[playerid][exit_x] = 1410.5220;
  1125. HouseData[playerid][exit_y] = -920.7756;
  1126. HouseData[playerid][exit_z] = 38.4219;
  1127. HouseData[playerid][entr_x] = 327.7443;
  1128. HouseData[playerid][entr_y] = 1478.0784;
  1129. HouseData[playerid][entr_z] = 1084.4375;
  1130.  
  1131. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  1132. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  1133. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  1134.  
  1135. // SET WHAT HOUSE WE STEAL
  1136. HouseData[playerid][idhouse] = 19; // id of the house
  1137. GlobalHouses[19] = 1; // Declare we are robing house 19
  1138.  
  1139. }
  1140. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1242.5571,-878.2666,46.6406)) // HOUSE 20
  1141. {
  1142. if(GlobalHouses[20] == 1 && HOUSEID != 2)
  1143. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  1144.  
  1145. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  1146. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  1147.  
  1148. if(STEALING && HOUSEID != 20) // Check if we are stealing the same house we begin with
  1149. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  1150.  
  1151. if(!STEALING)RAISEWNTDLVL
  1152.  
  1153. // SET PLAYER INSIDE
  1154. SetPlayerInterior(playerid, 15);
  1155. SetPlayerPos(playerid, 295.138977,1474.469971,1080.519897 );
  1156. SetPlayerVirtualWorld(playerid, 1);
  1157. // CREATE THE OBJECTS
  1158. if(!STEALING)
  1159. {
  1160. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,292.2426,1487.3580,1080.5,10.0,1,1);
  1161. StealObjs[playerid][tv] = CreateObject( 2648, 292.2426,1487.3580,1080.0, 0, 0, 175 ); // 2648
  1162.  
  1163. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,297.8346,1475.6444,1081.2,10.0,1,1);
  1164. StealObjs[playerid][video] = CreateObject( 1783, 297.8346,1475.6444,1080.6, 0, 0, 110 ); // 1783
  1165.  
  1166. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,289.5742,1489.8972,1080.5,10.0,1,1);
  1167. StealObjs[playerid][speaker] = CreateObject( 2102, 290.0,1489.8,1080.0, 0, 0, 0 ); // 2102
  1168. }
  1169. // GATHER DATA
  1170. HouseData[playerid][exit_x] = 1242.5571;
  1171. HouseData[playerid][exit_y] = -878.2666;
  1172. HouseData[playerid][exit_z] = 46.6406;
  1173. HouseData[playerid][entr_x] = 295.1858;
  1174. HouseData[playerid][entr_y] = 1472.2568;
  1175. HouseData[playerid][entr_z] = 1080.2578;
  1176.  
  1177. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  1178. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  1179. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  1180.  
  1181. // SET WHAT HOUSE WE STEAL
  1182. HouseData[playerid][idhouse] = 20; // id of the house
  1183. GlobalHouses[20] = 1; // Declare we are robing house 20
  1184.  
  1185. }
  1186. else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1283.5397,-897.8742,42.8753)) // HOUSE 21
  1187. {
  1188. if(GlobalHouses[21] == 1 && HOUSEID != 3)
  1189. return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
  1190.  
  1191. if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
  1192. return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
  1193.  
  1194. if(STEALING && HOUSEID != 21) // Check if we are stealing the same house we begin with
  1195. return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
  1196.  
  1197. if(!STEALING)RAISEWNTDLVL
  1198.  
  1199. // SET PLAYER INSIDE
  1200. SetPlayerInterior(playerid, 1);
  1201. SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
  1202. SetPlayerVirtualWorld(playerid, 1);
  1203. // CREATE THE OBJECTS
  1204. if(!STEALING)
  1205. {
  1206. StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition!",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
  1207. StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
  1208.  
  1209. StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
  1210. StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
  1211.  
  1212. StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
  1213. StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
  1214. }
  1215. // GATHER DATA
  1216. HouseData[playerid][exit_x] = 1283.5397;
  1217. HouseData[playerid][exit_y] = -897.8742;
  1218. HouseData[playerid][exit_z] = 42.8753;
  1219. HouseData[playerid][entr_x] = 222.9946;
  1220. HouseData[playerid][entr_y] = 1287.0769;
  1221. HouseData[playerid][entr_z] = 1082.1406;
  1222.  
  1223. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  1224. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  1225. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  1226.  
  1227. // SET WHAT HOUSE WE STEAL
  1228. HouseData[playerid][idhouse] = 21; // id of the house
  1229. GlobalHouses[21] = 1; // Declare we are robing house 21
  1230.  
  1231. }
  1232. else if(HOUSEID >= 0)
  1233. HousesHandler(playerid); // Handles what happens when you enter & then exit a house
  1234. }
  1235. else if(newkeys == KEY_WALK)
  1236. {
  1237. if(GetPlayerInterior(playerid) != 0 && HOUSEID >= 0)
  1238. {
  1239. if(GETDISTANCEVANTOHOUSE > 25)
  1240. return GameTextForPlayer(playerid,"~r~~h~Debes acercar la~n~~r~~h~furgoneta a la casa!",1000,4); // The van should be close enough
  1241.  
  1242. if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]))
  1243. {
  1244. if(CURRENTITEM || VanCheck[playerid][tv]) return 1; // We already have an item of this type
  1245.  
  1246. for (new i = 0; i < 13; i++)
  1247. {
  1248. GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
  1249. }
  1250.  
  1251. ResetPlayerWeapons(playerid);
  1252. STEALING = 1; // set if we are stealing the house
  1253. CURRENTITEM = 1; // The current item we are stealing
  1254. AttachObjectToPlayer( StealObjs[playerid][tv], playerid, 0.3, 0.0, 0.0, 0, 50, 50);
  1255. Delete3DTextLabel(StealObjs[playerid][tvtag]);
  1256. Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
  1257. Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
  1258.  
  1259. SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
  1260.  
  1261. }
  1262. else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]))
  1263. {
  1264. if(CURRENTITEM || VanCheck[playerid][video]) return 1; // We already have an item of this type
  1265.  
  1266. for (new i = 0; i < 13; i++)
  1267. {
  1268. GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
  1269. }
  1270.  
  1271. ResetPlayerWeapons(playerid);
  1272. STEALING = 1; // set if we are stealing the house
  1273. CURRENTITEM = 2; // The current item we are stealing
  1274. AttachObjectToPlayer( StealObjs[playerid][video], playerid, 0.3, 0.0, 0.1, 75, 0, 100);
  1275. Delete3DTextLabel(StealObjs[playerid][videotag]);
  1276. Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
  1277. Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
  1278. SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
  1279.  
  1280. }
  1281. else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]))
  1282. {
  1283. if(CURRENTITEM || VanCheck[playerid][speaker]) return 1; // We already have an item of this type
  1284.  
  1285. for (new i = 0; i < 13; i++)
  1286. {
  1287. GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
  1288. }
  1289.  
  1290. ResetPlayerWeapons(playerid);
  1291. STEALING = 1; // set if we are stealing the house
  1292. CURRENTITEM = 3; // The current item we are stealing
  1293. AttachObjectToPlayer( StealObjs[playerid][speaker], playerid, 0.3, 0.0, 0.0, 0, 0, 100);
  1294. Delete3DTextLabel(StealObjs[playerid][speakertag]);
  1295. Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
  1296. Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
  1297. SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
  1298.  
  1299. }
  1300. }
  1301. else if(STEALING == 1 && CURRENTITEM >= 1)
  1302. {
  1303. new Float:x,Float:y,Float:z;
  1304. GetVehiclePos(VanCheck[playerid][vehicle], x,y,z);
  1305.  
  1306. if(GETDISTANCEPLAYERTOPOINT <= 8)
  1307. {
  1308. VanCheck[playerid][cargo] += 1;
  1309.  
  1310. switch(CURRENTITEM)
  1311. {
  1312. case 1: { VanCheck[playerid][tv] = 1; DestroyObject(StealObjs[playerid][tv]); }
  1313. case 2: { VanCheck[playerid][video] = 1; DestroyObject(StealObjs[playerid][video]); }
  1314. case 3: { VanCheck[playerid][speaker] = 1; DestroyObject(StealObjs[playerid][speaker]); }
  1315. }
  1316.  
  1317. if(VanCheck[playerid][cargo] == 3)
  1318. {
  1319. KillTimer(Timers[playerid][0]);
  1320. KillTimer(Timers[playerid][1]);
  1321. KillTimer(Timers[playerid][2]);
  1322. CURRENTITEM = 0;
  1323. HOUSEID = -1;
  1324. STEALING = 0;
  1325. ClearAnimations(playerid);
  1326. Timers[playerid][2] = SetTimerEx("DropCargo", 1000, true, "i", playerid);
  1327. RESTOREWEAPONS
  1328. return GameTextForPlayer(playerid,"~g~~h~~h~La camioneta~n~~g~~h~~h~esta llena!",1500,4);
  1329. }
  1330.  
  1331. KillTimer(Timers[playerid][0]);
  1332. KillTimer(Timers[playerid][1]);
  1333. KillTimer(Timers[playerid][2]);
  1334. CURRENTITEM = 0;
  1335. ClearAnimations(playerid);
  1336. GameTextForPlayer(playerid,"~g~~h~~h~Guardado!",1000,4);
  1337. RESTOREWEAPONS
  1338. Timers[playerid][2] = SetTimerEx("DropCargo", 1000, true, "i", playerid);
  1339. }
  1340. }
  1341. else if(STEALING == 1 && CURRENTITEM == 0) // TESTING
  1342. {
  1343. if(GETDISTANCEVANTOHOUSE > 25)
  1344. return GameTextForPlayer(playerid,"~r~~h~Debes acercar la~n~~r~~h~furgoneta a la casa!",1000,4); // The van should be close enough
  1345.  
  1346. if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]))
  1347. {
  1348. if(CURRENTITEM || VanCheck[playerid][tv]) return 1; // We already have an item of this type
  1349.  
  1350. for (new i = 0; i < 13; i++)
  1351. {
  1352. GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
  1353. }
  1354.  
  1355. ResetPlayerWeapons(playerid);
  1356. STEALING = 1; // set if we are stealing the house
  1357. CURRENTITEM = 1; // The current item we are stealing
  1358. //ApplyAnimation(playerid,"BOX","boxhipup",1,0,0,0,1,1);
  1359. AttachObjectToPlayer( StealObjs[playerid][tv], playerid, 0.3, 0.0, 0.0, 0, 50, 50);
  1360. Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
  1361. Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
  1362. SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
  1363.  
  1364. }
  1365. else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]))
  1366. {
  1367. if(CURRENTITEM || VanCheck[playerid][video]) return 1; // We already have an item of this type
  1368.  
  1369. for (new i = 0; i < 13; i++)
  1370. {
  1371. GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
  1372. }
  1373.  
  1374. ResetPlayerWeapons(playerid);
  1375. STEALING = 1; // set if we are stealing the house
  1376. CURRENTITEM = 2; // The current item we are stealing
  1377. AttachObjectToPlayer( StealObjs[playerid][video], playerid, 0.3, 0.0, 0.1, 75, 0, 100);
  1378. Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
  1379. Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
  1380. SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
  1381.  
  1382. }
  1383. else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]))
  1384. {
  1385. if(CURRENTITEM || VanCheck[playerid][speaker]) return 1; // We already have an item of this type
  1386.  
  1387. for (new i = 0; i < 13; i++)
  1388. {
  1389. GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
  1390. }
  1391.  
  1392. ResetPlayerWeapons(playerid);
  1393. STEALING = 1; // set if we are stealing the house
  1394. CURRENTITEM = 3; // The current item we are stealing
  1395. AttachObjectToPlayer( StealObjs[playerid][speaker], playerid, 0.3, 0.0, 0.0, 0, 0, 100);
  1396. Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
  1397. Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
  1398. SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
  1399. }
  1400. }
  1401. }
  1402. return 1;
  1403. }
  1404.  
  1405. public OnPlayerUpdate(playerid)
  1406. {
  1407. return 1;
  1408. }
  1409.  
  1410. public CheckDistance(playerid)
  1411. {
  1412. if(GetPlayerVirtualWorld(playerid) == 0 && GetDistanceBetweenPoints(playerid, 1, HouseData[playerid][exit_x],HouseData[playerid][exit_y],HouseData[playerid][exit_z]) > 50) //25
  1413. {
  1414. GameTextForPlayer(playerid,"~r~~h~Robbery stopped!",3000,4); // If we get too far away, we fail
  1415.  
  1416. if(!IsPlayerInVehicle(playerid, VanCheck[playerid][vehicle]))
  1417. KillTimer(Timers[playerid][2]);
  1418.  
  1419. if(CURRENTITEM)
  1420. ClearAnimations(playerid);
  1421.  
  1422. DestroyObject(StealObjs[playerid][tv]);
  1423. DestroyObject(StealObjs[playerid][speaker]);
  1424. DestroyObject(StealObjs[playerid][video]);
  1425. CURRENTITEM = 0;
  1426. STEALING = 0;
  1427. HOUSEID = -1;
  1428. KillTimer(Timers[playerid][0]);
  1429. KillTimer(Timers[playerid][1]);
  1430. KillTimer(Timers[playerid][3]);
  1431. }
  1432. }
  1433.  
  1434. public Check(playerid)
  1435. {
  1436. new Keys,ud,lr;
  1437. GetPlayerKeys(playerid,Keys,ud,lr);
  1438.  
  1439. //if(Keys == KEY_WALK && item >= 1)
  1440. if((ud == KEY_UP || ud == KEY_DOWN || lr == KEY_LEFT || lr == KEY_RIGHT) && CURRENTITEM >= 1)
  1441. {
  1442. ApplyAnimation(playerid,"BOX","bxhipwlk",1300,1,1,1,1,5000); // Apply animation if we move with an item
  1443. }
  1444. else
  1445. {
  1446. ClearAnimations(playerid);
  1447. }
  1448.  
  1449. return 1;
  1450. }
  1451.  
  1452. public CheckObjDrop(playerid)
  1453. {
  1454. new Keys,ud,lr;
  1455. GetPlayerKeys(playerid,Keys,ud,lr);
  1456.  
  1457. if(Keys == KEY_SPRINT || Keys == KEY_JUMP || Keys == KEY_CROUCH) // Drop the item we have in the hand
  1458. {
  1459. new Float:x,Float:y,Float:z;
  1460. GetPlayerPos(playerid,x,y,z);
  1461.  
  1462. switch(CURRENTITEM)
  1463. {
  1464. case 1:
  1465. {
  1466. DestroyObject(StealObjs[playerid][tv]);
  1467. StealObjs[playerid][tv] = CreateObject( 2648, x,y,z-0.5, 0, 0, random(100) );
  1468. GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
  1469. }
  1470. case 2:
  1471. {
  1472. DestroyObject(StealObjs[playerid][video]);
  1473. StealObjs[playerid][video] = CreateObject( 1783, x,y,z-0.8, 0, 0, random(100) );
  1474. GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
  1475. }
  1476. case 3:
  1477. {
  1478. DestroyObject(StealObjs[playerid][speaker]);
  1479. StealObjs[playerid][speaker] = CreateObject( 2102, x,y,z-0.8, 0, 0, random(100) );
  1480. GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
  1481. }
  1482. }
  1483.  
  1484. KillTimer(Timers[playerid][0]);
  1485. KillTimer(Timers[playerid][1]);
  1486. CURRENTITEM = 0;
  1487. ClearAnimations(playerid);
  1488. RESTOREWEAPONS
  1489.  
  1490. }
  1491.  
  1492. return 1;
  1493. }
  1494.  
  1495. public DropCargo(playerid)
  1496. {
  1497. if(IsPlayerInRangeOfPoint(playerid, 1.0, 1111.2129,-1330.6729,13.1730))
  1498. {
  1499. new string[128],money;
  1500.  
  1501. if(IsPlayerInVehicle(playerid,VanCheck[playerid][vehicle]))
  1502. {
  1503.  
  1504. if(VanCheck[playerid][tv])
  1505. {
  1506. money += 1000;
  1507. format(string,sizeof(string), "~g~~h~~h~Cargo: $%i!!",money);
  1508. }
  1509. if(VanCheck[playerid][video])
  1510. {
  1511. money += 1000;
  1512. format(string,sizeof(string), "~g~~h~~h~Cargo: $%i!!",money);
  1513. }
  1514. if(VanCheck[playerid][speaker])
  1515. {
  1516. money += 1000;
  1517. format(string,sizeof(string), "~g~~h~~h~Cargo: $%i!!",money);
  1518. }
  1519. if(VanCheck[playerid][cargo] == 3)
  1520. {
  1521. money = 4500;
  1522. format(string,sizeof(string), "~g~~h~~h~Max. Cargo: $%i!!",money);
  1523.  
  1524. }
  1525.  
  1526. KillTimer(Timers[playerid][2]);
  1527. GivePlayerMoney(playerid, money);
  1528. DestroyVehicle(VanCheck[playerid][vehicle]);
  1529. GameTextForPlayer(playerid,string,3000,4);
  1530. }
  1531. else return GameTextForPlayer(playerid,"~g~~h~~h~You can't unload~n~~g~~h~~h~in this place!",3000,4);
  1532. }
  1533.  
  1534. return 1;
  1535. }
  1536.  
  1537. stock HousesHandler(playerid)
  1538. {
  1539. if(IsPlayerInRangeOfPoint(playerid, 1.8, HouseData[playerid][entr_x],HouseData[playerid][entr_y],HouseData[playerid][entr_z]))
  1540. {
  1541.  
  1542. // DESTROY THE OBJECTS & RESET HOUSEID
  1543. if(!STEALING)
  1544. {
  1545. DestroyObject(StealObjs[playerid][tv]);
  1546. DestroyObject(StealObjs[playerid][speaker]);
  1547. DestroyObject(StealObjs[playerid][video]);
  1548. Delete3DTextLabel(StealObjs[playerid][tvtag]);
  1549. Delete3DTextLabel(StealObjs[playerid][videotag]);
  1550. Delete3DTextLabel(StealObjs[playerid][speakertag]);
  1551. HouseData[playerid][idhouse] = -1;
  1552. KillTimer(Timers[playerid][2]);
  1553. }
  1554.  
  1555. SetPlayerPos( playerid, HouseData[playerid][exit_x],HouseData[playerid][exit_y],HouseData[playerid][exit_z] );
  1556. SetPlayerVirtualWorld(playerid, 0);
  1557. SetPlayerInterior(playerid, 0);
  1558. Timers[playerid][3] = SetTimerEx("CheckDistance", 1000, true, "i", playerid);
  1559.  
  1560. return 1;
  1561. }
  1562. return 0;
  1563. }
  1564.  
  1565. stock Float:GetDistanceBetweenPoints(modelid,type,Float:x2,Float:y2,Float:z2) //By Slick (Edited by Sacky and Gabriel "Larcius" Cordes)
  1566. {
  1567. new Float:x1,Float:y1,Float:z1;
  1568.  
  1569. switch(type)
  1570. {
  1571. case 0:
  1572. {
  1573. GetVehiclePos(modelid,x1,y1,z1);
  1574. }
  1575. case 1:
  1576. {
  1577. GetPlayerPos(modelid,x1,y1,z1);
  1578. }
  1579. }
  1580.  
  1581. return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
  1582.  
  1583. }
Advertisement
Add Comment
Please, Sign In to add comment