Advertisement
Guest User

Untitled

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