Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #pragma tabsize 0
- #define PLAYERS 100 // Change this to whatever you use.
- #define TIME 1300 // animation time
- #define HOUSEID HouseData[playerid][idhouse]
- #define STEALING HouseData[playerid][stealing]
- #define GETDISTANCEVANTOHOUSE GetDistanceBetweenPoints(VanCheck[playerid][vehicle], 0, HouseData[playerid][exit_x],HouseData[playerid][exit_y],HouseData[playerid][exit_z])
- #define GETDISTANCEPLAYERTOPOINT GetDistanceBetweenPoints(playerid, 1, x,y,z)
- #define CURRENTITEM HouseData[playerid][currentitem]
- #define RESTOREWEAPONS for (new i = 0; i < 13; i++){GivePlayerWeapon(playerid, Weapons[playerid][i][0], Weapons[playerid][i][1]);}
- #define RAISEWNTDLVL SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
- // Forward Functions
- forward Float:GetDistanceBetweenPoints(modelid,type,Float:x2,Float:y2,Float:z2);
- forward Check(playerid);
- forward CheckObjDrop(playerid);
- forward CheckDistance(playerid);
- forward DropCargo(playerid);
- // Enums
- enum types
- {
- tv, // 2648
- Text3D:tvtag,
- speaker, // 1783
- Text3D:speakertag,
- video, // 2102
- Text3D:videotag
- };
- enum data
- {
- // HOUSE POSITIONS
- Float:exit_x,
- Float:exit_y,
- Float:exit_z,
- Float:entr_x,
- Float:entr_y,
- Float:entr_z,
- Float:steal1_x,
- Float:steal1_y,
- Float:steal1_z,
- Float:steal2_x,
- Float:steal2_y,
- Float:steal2_z,
- Float:steal3_x,
- Float:steal3_y,
- Float:steal3_z,
- // VAN DATA
- vehicle,
- vehmodel,
- cargo, // TOTAL CARGO
- tv, // TELEVITION
- speaker, // SPEAKERS
- video, // VIDEO RECORDERS
- // HOUSE DATA
- idhouse,
- stealing,
- currentitem
- };
- // Arrays
- new StealObjs[PLAYERS][types];
- new HouseData[PLAYERS][data];
- new Weapons[PLAYERS][13][2];
- new GlobalHouses[100];
- new VanCheck[PLAYERS][data];
- new Timers[PLAYERS][4];
- // -----------------------------------------------------------------------------
- public OnFilterScriptInit()
- {
- // HOUSES
- Create3DTextLabel("Steal house",0x008080FF,893.6293,-1635.6991,14.9297,30.0,0,1); // Regular House 0
- Create3DTextLabel("Steal house",0x008080FF,877.9787,-1515.0007,14.3472,30.0,0,1); // Regular House 1
- Create3DTextLabel("Steal house",0x008080FF,850.3426,-1520.1302,14.1556,30.0,0,1); // Regular House 2
- Create3DTextLabel("Steal house",0x008080FF,772.2767,-1511.0217,13.5469,30.0,0,1); // Regular House 3
- Create3DTextLabel("Steal house",0x008080FF,766.9218,-1605.8341,13.8039,30.0,0,1); // Regular House 4
- Create3DTextLabel("Steal house",0x008080FF,768.0768,-1655.7711,5.6094,30.0,0,1); // Regular House 5
- Create3DTextLabel("Steal house",0x008080FF,769.2180,-1696.5428,5.1554,30.0,0,1); // Regular House 6
- Create3DTextLabel("Steal house",0x008080FF,769.2269,-1745.9491,13.0773,30.0,0,1); // Regular House 7
- Create3DTextLabel("Steal house",0x008080FF,769.0789,-1726.2399,13.4321,30.0,0,1); // Regular House 8
- Create3DTextLabel("Steal house",0x008080FF,769.2269,-1745.9491,13.0773,30.0,0,1); // Regular House 9
- Create3DTextLabel("Steal house",0x008080FF,769.0789,-1726.2399,13.4321,30.0,0,1); // Regular House 10
- Create3DTextLabel("Steal house",0x008080FF,693.5486,-1705.9419,3.8195,30.0,0,1); // Regular House 11
- Create3DTextLabel("Steal house",0x008080FF,694.7153,-1690.7299,4.3461,30.0,0,1); // Regular House 12
- Create3DTextLabel("Steal house",0x008080FF,657.2186,-1652.5876,15.4063,30.0,0,1); // Regular House 13
- Create3DTextLabel("Steal house",0x008080FF,1103.3270,-1092.3955,28.4688,30.0,0,1); // Regular House 14
- Create3DTextLabel("Steal house",0x008080FF,1068.4271,-1081.3989,27.5257,30.0,0,1); // Regular House 15
- Create3DTextLabel("Steal house",0x008080FF,1117.9961,-1021.7153,34.9922,30.0,0,1); // Regular House 16
- Create3DTextLabel("Steal house",0x008080FF,1234.7405,-1016.2308,36.3359,30.0,0,1); // Regular House 17
- Create3DTextLabel("Steal house",0x008080FF,1284.8151,-1097.9276,25.9003,30.0,0,1); // Regular House 18
- Create3DTextLabel("Steal house",0x008080FF,1410.5220,-920.7756,38.4219,30.0,0,1); // Regular House 19
- Create3DTextLabel("Steal house",0x008080FF,1242.5571,-878.2666,46.6406,30.0,0,1); // Regular House 20
- Create3DTextLabel("Steal house",0x008080FF,1283.5397,-897.8742,42.8753,30.0,0,1); // Regular House 21
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i=0;i<100;i++)
- {
- if(!IsPlayerConnected(i) || !IsPlayerNPC(i))
- {
- DestroyObject(StealObjs[i][video]);
- DestroyObject(StealObjs[i][speaker]);
- DestroyObject(StealObjs[i][tv]);
- Delete3DTextLabel(StealObjs[i][tvtag]);
- Delete3DTextLabel(StealObjs[i][videotag]);
- Delete3DTextLabel(StealObjs[i][speakertag]);
- VanCheck[i][vehicle] = -1;
- VanCheck[i][vehmodel] = -1;
- VanCheck[i][tv] = 0;
- VanCheck[i][video] = 0;
- VanCheck[i][speaker] = 0;
- VanCheck[i][cargo] = 0;
- GlobalHouses[i] = 0;
- RemovePlayerMapIcon( i, 96 );
- }
- }
- return 1;
- }
- // -----------------------------------------------------------------------------
- public OnPlayerSpawn(playerid)
- {
- if(IsPlayerNPC(playerid))
- return 1;
- SetPlayerMapIcon( playerid, 1, 1111.2129,-1330.6729,13.1730, 23, 0 );
- // Reset Everything
- HouseData[playerid][idhouse] = -1;
- HouseData[playerid][stealing] = 0;
- DestroyObject(StealObjs[playerid][video]);
- DestroyObject(StealObjs[playerid][speaker]);
- DestroyObject(StealObjs[playerid][tv]);
- Delete3DTextLabel(StealObjs[playerid][tvtag]);
- Delete3DTextLabel(StealObjs[playerid][videotag]);
- Delete3DTextLabel(StealObjs[playerid][speakertag]);
- VanCheck[playerid][vehicle] = -1;
- VanCheck[playerid][vehmodel] = -1;
- VanCheck[playerid][tv] = 0;
- VanCheck[playerid][video] = 0;
- VanCheck[playerid][speaker] = 0;
- VanCheck[playerid][cargo] = 0;
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(IsPlayerNPC(playerid))
- return 1;
- // CHECK IF WE DRIVE A BOXCAR
- if(newstate == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(vehicleid) == 609)
- {
- if(VanCheck[playerid][vehmodel] != 609)
- GameTextForPlayer(playerid,"~b~~h~~h~You can use this~n~~b~~h~~h~vehicle to steal houses!",3000,4);
- VanCheck[playerid][vehmodel] = 609;
- VanCheck[playerid][vehicle] = vehicleid;
- if(VanCheck[playerid][cargo] > 0)
- {
- STEALING = 0;
- HOUSEID = -1;
- GameTextForPlayer(playerid,"~b~~h~~h~Take your cargo~n~~b~~h~~h~to blue skull",3000,4);
- }
- }
- else VanCheck[playerid][vehmodel] = -1;
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new Float:x,Float:y,Float:z;
- GetVehiclePos(VanCheck[playerid][vehicle], x,y,z);
- new cmd[128], idx;
- cmd = strtok(cmdtext, idx);
- if (strcmp("/cargo", cmdtext, true, 6) == 0)
- {
- if(GETDISTANCEPLAYERTOPOINT <= 10)
- {
- new string[128];
- 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]);
- return ShowPlayerDialog(playerid,1000,0,"Boxcar",string,"Accept","Cancel");
- }
- return GameTextForPlayer(playerid,"~w~You must be close~n~~w~to your boxcar!",1500,4);
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- /*if(!(GetPlayerSkin(playerid) >= 0 && GetPlayerSkin(playerid) < 280)) // Only TEAM 1 can use this script
- return 1;*/
- if(newkeys == KEY_LOOK_BEHIND) // Press Look Behind to enter houses
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0, 893.6293,-1635.6991,14.9297)) // HOUSE 0
- {
- if(GlobalHouses[0] == 1 && HOUSEID != 0)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 0) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961 );
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 893.6293;
- HouseData[playerid][exit_y] = -1635.6991;
- HouseData[playerid][exit_z] = 14.9297;
- HouseData[playerid][entr_x] = 385.803986;
- HouseData[playerid][entr_y] = 1471.769897;
- HouseData[playerid][entr_z] = 1080.209961;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 0; // id of the house
- GlobalHouses[0] = 1; // Declare we are robing house 0
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 877.9787,-1515.0007,14.3472)) // HOUSE 1
- {
- if(GlobalHouses[1] == 1 && HOUSEID != 1)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 1) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 877.9787;
- HouseData[playerid][exit_y] = -1515.0007;
- HouseData[playerid][exit_z] = 14.3472;
- HouseData[playerid][entr_x] = 327.7443;
- HouseData[playerid][entr_y] = 1478.0784;
- HouseData[playerid][entr_z] = 1084.4375;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 1; // id of the house
- GlobalHouses[1] = 1; // Declare we are robing house 1
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 850.3426,-1520.1302,14.1556)) // HOUSE 2
- {
- if(GlobalHouses[2] == 1 && HOUSEID != 2)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 2) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 295.138977,1474.469971,1080.519897 );
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,292.2426,1487.3580,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 292.2426,1487.3580,1080.0, 0, 0, 175 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,297.8346,1475.6444,1081.2,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 297.8346,1475.6444,1080.6, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,289.5742,1489.8972,1080.5,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 290.0,1489.8,1080.0, 0, 0, 0 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 850.3426;
- HouseData[playerid][exit_y] = -1520.1302;
- HouseData[playerid][exit_z] = 14.1556;
- HouseData[playerid][entr_x] = 295.1858;
- HouseData[playerid][entr_y] = 1472.2568;
- HouseData[playerid][entr_z] = 1080.2578;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 2; // id of the house
- GlobalHouses[2] = 1; // Declare we are robing house 2
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 772.2767,-1511.0217,13.5469)) // HOUSE 3
- {
- if(GlobalHouses[3] == 1 && HOUSEID != 3)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 3) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 772.2767;
- HouseData[playerid][exit_y] = -1511.0217;
- HouseData[playerid][exit_z] = 13.5469;
- HouseData[playerid][entr_x] = 222.9946;
- HouseData[playerid][entr_y] = 1287.0769;
- HouseData[playerid][entr_z] = 1082.1406;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 3; // id of the house
- GlobalHouses[3] = 1; // Declare we are robing house 3
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 766.9218,-1605.8341,13.8039)) // HOUSE 4
- {
- if(GlobalHouses[4] == 1 && HOUSEID != 4)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 4) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 766.9218;
- HouseData[playerid][exit_y] = -1605.8341;
- HouseData[playerid][exit_z] = 13.8039;
- HouseData[playerid][entr_x] = 222.9946;
- HouseData[playerid][entr_y] = 1287.0769;
- HouseData[playerid][entr_z] = 1082.1406;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 4; // id of the house
- GlobalHouses[4] = 1; // Declare we are robing house 4
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 768.0768,-1655.7711,5.6094)) // HOUSE 5
- {
- if(GlobalHouses[5] == 1 && HOUSEID != 5)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- //if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- // return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 5) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 768.0768;
- HouseData[playerid][exit_y] = -1655.7711;
- HouseData[playerid][exit_z] = 5.6094;
- HouseData[playerid][entr_x] = 385.803986;
- HouseData[playerid][entr_y] = 1471.769897;
- HouseData[playerid][entr_z] = 1080.209961;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 5; // id of the house
- GlobalHouses[5] = 1; // Declare we are robing house 5
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 769.2180,-1696.5428,5.1554)) // HOUSE 6
- {
- if(GlobalHouses[6] == 1 && HOUSEID != 6)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 6) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 769.2180;
- HouseData[playerid][exit_y] = -1696.5428;
- HouseData[playerid][exit_z] = 5.1554;
- HouseData[playerid][entr_x] = 327.7443;
- HouseData[playerid][entr_y] = 1478.0784;
- HouseData[playerid][entr_z] = 1084.4375;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 6; // id of the house
- GlobalHouses[1] = 6; // Declare we are robing house 6
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 769.2269,-1745.9491,13.0773)) // HOUSE 7
- {
- if(GlobalHouses[7] == 1 && HOUSEID != 7)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 7) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 769.2269;
- HouseData[playerid][exit_y] = -1745.9491;
- HouseData[playerid][exit_z] = 13.0773;
- HouseData[playerid][entr_x] = 222.9946;
- HouseData[playerid][entr_y] = 1287.0769;
- HouseData[playerid][entr_z] = 1082.1406;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 7; // id of the house
- GlobalHouses[7] = 1; // Declare we are robing house 7
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 769.0789,-1726.2399,13.4321)) // HOUSE 8
- {
- if(GlobalHouses[8] == 1 && HOUSEID != 4)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 8) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 769.0789;
- HouseData[playerid][exit_y] = -1726.2399;
- HouseData[playerid][exit_z] = 13.4321;
- HouseData[playerid][entr_x] = 222.9946;
- HouseData[playerid][entr_y] = 1287.0769;
- HouseData[playerid][entr_z] = 1082.1406;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 8; // id of the house
- GlobalHouses[8] = 1; // Declare we are robing house 8
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 693.5486,-1705.9419,3.8195)) // HOUSE 9
- {
- if(GlobalHouses[9] == 1 && HOUSEID != 0)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 9) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961 );
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 693.5486;
- HouseData[playerid][exit_y] = -1705.9419;
- HouseData[playerid][exit_z] = 3.8195;
- HouseData[playerid][entr_x] = 385.803986;
- HouseData[playerid][entr_y] = 1471.769897;
- HouseData[playerid][entr_z] = 1080.209961;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 9; // id of the house
- GlobalHouses[9] = 1; // Declare we are robing house 9
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 694.7153,-1690.7299,4.3461)) // HOUSE 10
- {
- if(GlobalHouses[10] == 1 && HOUSEID != 1)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 10) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 694.7153;
- HouseData[playerid][exit_y] = -1690.7299;
- HouseData[playerid][exit_z] = 4.3461;
- HouseData[playerid][entr_x] = 327.7443;
- HouseData[playerid][entr_y] = 1478.0784;
- HouseData[playerid][entr_z] = 1084.4375;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 10; // id of the house
- GlobalHouses[10] = 1; // Declare we are robing house 10
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 693.7615,-1645.9271,4.0938)) // HOUSE 11
- {
- if(GlobalHouses[11] == 1 && HOUSEID != 2)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 11) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 295.138977,1474.469971,1080.519897 );
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,292.2426,1487.3580,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 292.2426,1487.3580,1080.0, 0, 0, 175 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,297.8346,1475.6444,1081.2,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 297.8346,1475.6444,1080.6, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,289.5742,1489.8972,1080.5,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 290.0,1489.8,1080.0, 0, 0, 0 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 693.7615;
- HouseData[playerid][exit_y] = -1645.9271;
- HouseData[playerid][exit_z] = 4.0938;
- HouseData[playerid][entr_x] = 295.1858;
- HouseData[playerid][entr_y] = 1472.2568;
- HouseData[playerid][entr_z] = 1080.2578;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 11; // id of the house
- GlobalHouses[11] = 1; // Declare we are robing house 11
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 697.2795,-1627.1449,3.7492)) // HOUSE 12
- {
- if(GlobalHouses[12] == 1 && HOUSEID != 3)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 12) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 697.2795;
- HouseData[playerid][exit_y] = -1627.1449;
- HouseData[playerid][exit_z] = 3.7492;
- HouseData[playerid][entr_x] = 222.9946;
- HouseData[playerid][entr_y] = 1287.0769;
- HouseData[playerid][entr_z] = 1082.1406;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 12; // id of the house
- GlobalHouses[12] = 1; // Declare we are robing house 12
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 657.2186,-1652.5876,15.4063)) // HOUSE 13
- {
- if(GlobalHouses[13] == 1 && HOUSEID != 13)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 13) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 657.2186;
- HouseData[playerid][exit_y] = -1652.5876;
- HouseData[playerid][exit_z] = 15.4063;
- HouseData[playerid][entr_x] = 222.9946;
- HouseData[playerid][entr_y] = 1287.0769;
- HouseData[playerid][entr_z] = 1082.1406;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 13; // id of the house
- GlobalHouses[13] = 1; // Declare we are robing house 13
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1103.3270,-1092.3955,28.4688)) // HOUSE 14
- {
- if(GlobalHouses[14] == 1 && HOUSEID != 0)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 14) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961 );
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 1103.3270;
- HouseData[playerid][exit_y] = -1092.3955;
- HouseData[playerid][exit_z] = 28.4688;
- HouseData[playerid][entr_x] = 385.803986;
- HouseData[playerid][entr_y] = 1471.769897;
- HouseData[playerid][entr_z] = 1080.209961;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 14; // id of the house
- GlobalHouses[14] = 1; // Declare we are robing house 14
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1068.4271,-1081.3989,27.5257)) // HOUSE 15
- {
- if(GlobalHouses[15] == 1 && HOUSEID != 1)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 15) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 1068.4271;
- HouseData[playerid][exit_y] = -1081.3989;
- HouseData[playerid][exit_z] = 27.5257;
- HouseData[playerid][entr_x] = 327.7443;
- HouseData[playerid][entr_y] = 1478.0784;
- HouseData[playerid][entr_z] = 1084.4375;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 15; // id of the house
- GlobalHouses[15] = 1; // Declare we are robing house 15
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1117.9961,-1021.7153,34.9922)) // HOUSE 16
- {
- if(GlobalHouses[16] == 1 && HOUSEID != 2)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 16) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 295.138977,1474.469971,1080.519897 );
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,292.2426,1487.3580,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 292.2426,1487.3580,1080.0, 0, 0, 175 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,297.8346,1475.6444,1081.2,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 297.8346,1475.6444,1080.6, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,289.5742,1489.8972,1080.5,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 290.0,1489.8,1080.0, 0, 0, 0 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 1117.9961;
- HouseData[playerid][exit_y] = -1021.7153;
- HouseData[playerid][exit_z] = 34.9922;
- HouseData[playerid][entr_x] = 295.1858;
- HouseData[playerid][entr_y] = 1472.2568;
- HouseData[playerid][entr_z] = 1080.2578;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 16; // id of the house
- GlobalHouses[16] = 1; // Declare we are robing house 16
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1234.7405,-1016.2308,36.3359)) // HOUSE 17
- {
- if(GlobalHouses[17] == 1 && HOUSEID != 3)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 17) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 1234.7405;
- HouseData[playerid][exit_y] = -1016.2308;
- HouseData[playerid][exit_z] = 36.3359;
- HouseData[playerid][entr_x] = 222.9946;
- HouseData[playerid][entr_y] = 1287.0769;
- HouseData[playerid][entr_z] = 1082.1406;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 17; // id of the house
- GlobalHouses[17] = 1; // Declare we are robing house 17
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1284.8151,-1097.9276,25.9003)) // HOUSE 18
- {
- if(GlobalHouses[18] == 1 && HOUSEID != 0)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 18) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 385.803986, 1471.769897, 1080.209961 );
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,380.3905,1464.7642,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 380.3905,1464.7642,1080.0, 0, 0, random(100) ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,376.2588,1465.0875,1081.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 376.2588,1465.0875,1080.5, 0, 0, 100 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,377.9812,1461.1046,1079.7,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 377.9812,1461.1046,1079.2, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 1284.8151;
- HouseData[playerid][exit_y] = -1097.9276;
- HouseData[playerid][exit_z] = 25.9003;
- HouseData[playerid][entr_x] = 385.803986;
- HouseData[playerid][entr_y] = 1471.769897;
- HouseData[playerid][entr_z] = 1080.209961;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 18; // id of the house
- GlobalHouses[18] = 1; // Declare we are robing house 18
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1410.5220,-920.7756,38.4219)) // HOUSE 19
- {
- if(GlobalHouses[19] == 1 && HOUSEID != 1)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 19) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 327.7443,1478.0784,1084.4375);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,322.2554,1486.2512,1085.0,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 322.2554,1486.2512,1084.3, 0, 0, 200 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,336.5345,1480.0527,1085.0,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 336.5345,1480.0527,1084.3, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,325.9351,1481.9240,1085.0,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 325.9351,1481.9240,1084.6, 0, 0, 150 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 1410.5220;
- HouseData[playerid][exit_y] = -920.7756;
- HouseData[playerid][exit_z] = 38.4219;
- HouseData[playerid][entr_x] = 327.7443;
- HouseData[playerid][entr_y] = 1478.0784;
- HouseData[playerid][entr_z] = 1084.4375;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 19; // id of the house
- GlobalHouses[19] = 1; // Declare we are robing house 19
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1242.5571,-878.2666,46.6406)) // HOUSE 20
- {
- if(GlobalHouses[20] == 1 && HOUSEID != 2)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 20) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 295.138977,1474.469971,1080.519897 );
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition! ",0xFF0000FF,292.2426,1487.3580,1080.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 292.2426,1487.3580,1080.0, 0, 0, 175 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,297.8346,1475.6444,1081.2,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 297.8346,1475.6444,1080.6, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,289.5742,1489.8972,1080.5,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 290.0,1489.8,1080.0, 0, 0, 0 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 1242.5571;
- HouseData[playerid][exit_y] = -878.2666;
- HouseData[playerid][exit_z] = 46.6406;
- HouseData[playerid][entr_x] = 295.1858;
- HouseData[playerid][entr_y] = 1472.2568;
- HouseData[playerid][entr_z] = 1080.2578;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 20; // id of the house
- GlobalHouses[20] = 1; // Declare we are robing house 20
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1283.5397,-897.8742,42.8753)) // HOUSE 21
- {
- if(GlobalHouses[21] == 1 && HOUSEID != 3)
- return GameTextForPlayer(playerid,"~r~~h~This house's been~n~~r~~h~stolen already!",2000,4);
- if(GetVehicleModel(VanCheck[playerid][vehicle]) != 609) // We should use a specific type of car for this
- return GameTextForPlayer(playerid,"~r~~h~First find~n~~r~~h~a boxcar!",1000,4);
- if(STEALING && HOUSEID != 21) // Check if we are stealing the same house we begin with
- return GameTextForPlayer(playerid,"~r~~h~You can only steal~n~~r~~h~one house at a time!",2000,4);
- if(!STEALING)RAISEWNTDLVL
- // SET PLAYER INSIDE
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 222.9946,1287.0769,1082.1406);
- SetPlayerVirtualWorld(playerid, 1);
- // CREATE THE OBJECTS
- if(!STEALING)
- {
- StealObjs[playerid][tvtag] = Create3DTextLabel("Steal televition!",0xFF0000FF,224.2160,1289.8062,1082.5,10.0,1,1);
- StealObjs[playerid][tv] = CreateObject( 2648, 224.2160,1289.8062,1082.0, 0, 0, 100 ); // 2648
- StealObjs[playerid][videotag] = Create3DTextLabel("Steal taperecorder!",0xFF0000FF,217.4077,1292.4990,1082.5,10.0,1,1);
- StealObjs[playerid][video] = CreateObject( 1783, 216.8,1292.4990,1082.2, 0, 0, 110 ); // 1783
- StealObjs[playerid][speakertag] = Create3DTextLabel("Steal stereo!",0xFF0000FF,232.5032,1287.4136,1082.3,10.0,1,1);
- StealObjs[playerid][speaker] = CreateObject( 2102, 232.5032,1287.4136,1081.8, 0, 0, 100 ); // 2102
- }
- // GATHER DATA
- HouseData[playerid][exit_x] = 1283.5397;
- HouseData[playerid][exit_y] = -897.8742;
- HouseData[playerid][exit_z] = 42.8753;
- HouseData[playerid][entr_x] = 222.9946;
- HouseData[playerid][entr_y] = 1287.0769;
- HouseData[playerid][entr_z] = 1082.1406;
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- // SET WHAT HOUSE WE STEAL
- HouseData[playerid][idhouse] = 21; // id of the house
- GlobalHouses[21] = 1; // Declare we are robing house 21
- }
- else if(HOUSEID >= 0)
- HousesHandler(playerid); // Handles what happens when you enter & then exit a house
- }
- else if(newkeys == KEY_WALK)
- {
- if(GetPlayerInterior(playerid) != 0 && HOUSEID >= 0)
- {
- if(GETDISTANCEVANTOHOUSE > 25)
- return GameTextForPlayer(playerid,"~r~~h~Debes acercar la~n~~r~~h~furgoneta a la casa!",1000,4); // The van should be close enough
- if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]))
- {
- if(CURRENTITEM || VanCheck[playerid][tv]) return 1; // We already have an item of this type
- for (new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
- }
- ResetPlayerWeapons(playerid);
- STEALING = 1; // set if we are stealing the house
- CURRENTITEM = 1; // The current item we are stealing
- AttachObjectToPlayer( StealObjs[playerid][tv], playerid, 0.3, 0.0, 0.0, 0, 50, 50);
- Delete3DTextLabel(StealObjs[playerid][tvtag]);
- Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
- Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
- SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]))
- {
- if(CURRENTITEM || VanCheck[playerid][video]) return 1; // We already have an item of this type
- for (new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
- }
- ResetPlayerWeapons(playerid);
- STEALING = 1; // set if we are stealing the house
- CURRENTITEM = 2; // The current item we are stealing
- AttachObjectToPlayer( StealObjs[playerid][video], playerid, 0.3, 0.0, 0.1, 75, 0, 100);
- Delete3DTextLabel(StealObjs[playerid][videotag]);
- Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
- Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
- SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]))
- {
- if(CURRENTITEM || VanCheck[playerid][speaker]) return 1; // We already have an item of this type
- for (new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
- }
- ResetPlayerWeapons(playerid);
- STEALING = 1; // set if we are stealing the house
- CURRENTITEM = 3; // The current item we are stealing
- AttachObjectToPlayer( StealObjs[playerid][speaker], playerid, 0.3, 0.0, 0.0, 0, 0, 100);
- Delete3DTextLabel(StealObjs[playerid][speakertag]);
- Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
- Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
- SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
- }
- }
- else if(STEALING == 1 && CURRENTITEM >= 1)
- {
- new Float:x,Float:y,Float:z;
- GetVehiclePos(VanCheck[playerid][vehicle], x,y,z);
- if(GETDISTANCEPLAYERTOPOINT <= 8)
- {
- VanCheck[playerid][cargo] += 1;
- switch(CURRENTITEM)
- {
- case 1: { VanCheck[playerid][tv] = 1; DestroyObject(StealObjs[playerid][tv]); }
- case 2: { VanCheck[playerid][video] = 1; DestroyObject(StealObjs[playerid][video]); }
- case 3: { VanCheck[playerid][speaker] = 1; DestroyObject(StealObjs[playerid][speaker]); }
- }
- if(VanCheck[playerid][cargo] == 3)
- {
- KillTimer(Timers[playerid][0]);
- KillTimer(Timers[playerid][1]);
- KillTimer(Timers[playerid][2]);
- CURRENTITEM = 0;
- HOUSEID = -1;
- STEALING = 0;
- ClearAnimations(playerid);
- Timers[playerid][2] = SetTimerEx("DropCargo", 1000, true, "i", playerid);
- RESTOREWEAPONS
- return GameTextForPlayer(playerid,"~g~~h~~h~La camioneta~n~~g~~h~~h~esta llena!",1500,4);
- }
- KillTimer(Timers[playerid][0]);
- KillTimer(Timers[playerid][1]);
- KillTimer(Timers[playerid][2]);
- CURRENTITEM = 0;
- ClearAnimations(playerid);
- GameTextForPlayer(playerid,"~g~~h~~h~Guardado!",1000,4);
- RESTOREWEAPONS
- Timers[playerid][2] = SetTimerEx("DropCargo", 1000, true, "i", playerid);
- }
- }
- else if(STEALING == 1 && CURRENTITEM == 0) // TESTING
- {
- if(GETDISTANCEVANTOHOUSE > 25)
- return GameTextForPlayer(playerid,"~r~~h~Debes acercar la~n~~r~~h~furgoneta a la casa!",1000,4); // The van should be close enough
- if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]))
- {
- if(CURRENTITEM || VanCheck[playerid][tv]) return 1; // We already have an item of this type
- for (new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
- }
- ResetPlayerWeapons(playerid);
- STEALING = 1; // set if we are stealing the house
- CURRENTITEM = 1; // The current item we are stealing
- //ApplyAnimation(playerid,"BOX","boxhipup",1,0,0,0,1,1);
- AttachObjectToPlayer( StealObjs[playerid][tv], playerid, 0.3, 0.0, 0.0, 0, 50, 50);
- Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
- Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
- SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]))
- {
- if(CURRENTITEM || VanCheck[playerid][video]) return 1; // We already have an item of this type
- for (new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
- }
- ResetPlayerWeapons(playerid);
- STEALING = 1; // set if we are stealing the house
- CURRENTITEM = 2; // The current item we are stealing
- AttachObjectToPlayer( StealObjs[playerid][video], playerid, 0.3, 0.0, 0.1, 75, 0, 100);
- Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
- Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
- SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]))
- {
- if(CURRENTITEM || VanCheck[playerid][speaker]) return 1; // We already have an item of this type
- for (new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(playerid, i, Weapons[playerid][i][0], Weapons[playerid][i][1]);
- }
- ResetPlayerWeapons(playerid);
- STEALING = 1; // set if we are stealing the house
- CURRENTITEM = 3; // The current item we are stealing
- AttachObjectToPlayer( StealObjs[playerid][speaker], playerid, 0.3, 0.0, 0.0, 0, 0, 100);
- Timers[playerid][0] = SetTimerEx("Check", 500, true, "i", playerid);
- Timers[playerid][1] = SetTimerEx("CheckObjDrop", 100, true, "i", playerid);
- SendClientMessage(playerid, 0xFF0000FF, "Use WSDA to move. Release and press again to change direction");
- }
- }
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public CheckDistance(playerid)
- {
- if(GetPlayerVirtualWorld(playerid) == 0 && GetDistanceBetweenPoints(playerid, 1, HouseData[playerid][exit_x],HouseData[playerid][exit_y],HouseData[playerid][exit_z]) > 50) //25
- {
- GameTextForPlayer(playerid,"~r~~h~Robbery stopped!",3000,4); // If we get too far away, we fail
- if(!IsPlayerInVehicle(playerid, VanCheck[playerid][vehicle]))
- KillTimer(Timers[playerid][2]);
- if(CURRENTITEM)
- ClearAnimations(playerid);
- DestroyObject(StealObjs[playerid][tv]);
- DestroyObject(StealObjs[playerid][speaker]);
- DestroyObject(StealObjs[playerid][video]);
- CURRENTITEM = 0;
- STEALING = 0;
- HOUSEID = -1;
- KillTimer(Timers[playerid][0]);
- KillTimer(Timers[playerid][1]);
- KillTimer(Timers[playerid][3]);
- }
- }
- public Check(playerid)
- {
- new Keys,ud,lr;
- GetPlayerKeys(playerid,Keys,ud,lr);
- //if(Keys == KEY_WALK && item >= 1)
- if((ud == KEY_UP || ud == KEY_DOWN || lr == KEY_LEFT || lr == KEY_RIGHT) && CURRENTITEM >= 1)
- {
- ApplyAnimation(playerid,"BOX","bxhipwlk",1300,1,1,1,1,5000); // Apply animation if we move with an item
- }
- else
- {
- ClearAnimations(playerid);
- }
- return 1;
- }
- public CheckObjDrop(playerid)
- {
- new Keys,ud,lr;
- GetPlayerKeys(playerid,Keys,ud,lr);
- if(Keys == KEY_SPRINT || Keys == KEY_JUMP || Keys == KEY_CROUCH) // Drop the item we have in the hand
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- switch(CURRENTITEM)
- {
- case 1:
- {
- DestroyObject(StealObjs[playerid][tv]);
- StealObjs[playerid][tv] = CreateObject( 2648, x,y,z-0.5, 0, 0, random(100) );
- GetObjectPos(StealObjs[playerid][tv], HouseData[playerid][steal1_x],HouseData[playerid][steal1_y],HouseData[playerid][steal1_z]);
- }
- case 2:
- {
- DestroyObject(StealObjs[playerid][video]);
- StealObjs[playerid][video] = CreateObject( 1783, x,y,z-0.8, 0, 0, random(100) );
- GetObjectPos(StealObjs[playerid][video], HouseData[playerid][steal2_x],HouseData[playerid][steal2_y],HouseData[playerid][steal2_z]);
- }
- case 3:
- {
- DestroyObject(StealObjs[playerid][speaker]);
- StealObjs[playerid][speaker] = CreateObject( 2102, x,y,z-0.8, 0, 0, random(100) );
- GetObjectPos(StealObjs[playerid][speaker], HouseData[playerid][steal3_x],HouseData[playerid][steal3_y],HouseData[playerid][steal3_z]);
- }
- }
- KillTimer(Timers[playerid][0]);
- KillTimer(Timers[playerid][1]);
- CURRENTITEM = 0;
- ClearAnimations(playerid);
- RESTOREWEAPONS
- }
- return 1;
- }
- public DropCargo(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0, 1111.2129,-1330.6729,13.1730))
- {
- new string[128],money;
- if(IsPlayerInVehicle(playerid,VanCheck[playerid][vehicle]))
- {
- if(VanCheck[playerid][tv])
- {
- money += 1000;
- format(string,sizeof(string), "~g~~h~~h~Cargo: $%i!!",money);
- }
- if(VanCheck[playerid][video])
- {
- money += 1000;
- format(string,sizeof(string), "~g~~h~~h~Cargo: $%i!!",money);
- }
- if(VanCheck[playerid][speaker])
- {
- money += 1000;
- format(string,sizeof(string), "~g~~h~~h~Cargo: $%i!!",money);
- }
- if(VanCheck[playerid][cargo] == 3)
- {
- money = 4500;
- format(string,sizeof(string), "~g~~h~~h~Max. Cargo: $%i!!",money);
- }
- KillTimer(Timers[playerid][2]);
- GivePlayerMoney(playerid, money);
- DestroyVehicle(VanCheck[playerid][vehicle]);
- GameTextForPlayer(playerid,string,3000,4);
- }
- else return GameTextForPlayer(playerid,"~g~~h~~h~You can't unload~n~~g~~h~~h~in this place!",3000,4);
- }
- return 1;
- }
- stock HousesHandler(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.8, HouseData[playerid][entr_x],HouseData[playerid][entr_y],HouseData[playerid][entr_z]))
- {
- // DESTROY THE OBJECTS & RESET HOUSEID
- if(!STEALING)
- {
- DestroyObject(StealObjs[playerid][tv]);
- DestroyObject(StealObjs[playerid][speaker]);
- DestroyObject(StealObjs[playerid][video]);
- Delete3DTextLabel(StealObjs[playerid][tvtag]);
- Delete3DTextLabel(StealObjs[playerid][videotag]);
- Delete3DTextLabel(StealObjs[playerid][speakertag]);
- HouseData[playerid][idhouse] = -1;
- KillTimer(Timers[playerid][2]);
- }
- SetPlayerPos( playerid, HouseData[playerid][exit_x],HouseData[playerid][exit_y],HouseData[playerid][exit_z] );
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- Timers[playerid][3] = SetTimerEx("CheckDistance", 1000, true, "i", playerid);
- return 1;
- }
- return 0;
- }
- stock Float:GetDistanceBetweenPoints(modelid,type,Float:x2,Float:y2,Float:z2) //By Slick (Edited by Sacky and Gabriel "Larcius" Cordes)
- {
- new Float:x1,Float:y1,Float:z1;
- switch(type)
- {
- case 0:
- {
- GetVehiclePos(modelid,x1,y1,z1);
- }
- case 1:
- {
- GetPlayerPos(modelid,x1,y1,z1);
- }
- }
- return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement