DynamicBan Posted September 14, 2014 Share Posted September 14, 2014 (edited) Im trying to make a robbery script but, I got a problem with math.random. It creates the blip like it should. But the markers should be created in the house where the blip is. The blip shows where you need to go to rob the house, there should be 3 markers created at the int of the house. But how to make it so that it all spawns at the same place ( the blip and the rob markers ). I tried this, but it gives me an error local locations = { { 2351.9699707031, -1169.8599853516, 28.035507202148 }, --EastLosSantos { 2166.1999511719, -1671.4699707031, 15.073687553406 }, --house IdleWood { 2483.3798828125, -1996.1899414063, 13.834323883057 }, --house WilloField { 2402.5183105469, -1715.6148681641, 14.1328125 }, --house Ganton { 2495.330078125, -1690.75, 14.765625 } --house CJ } local markers = { -- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1027.97656, 0, 5 }, { 2348.66870, -1186.74658, 1027.97656, 0, 5 }, { 2322.23877, -1183.75879, 1027.97656, 0, 5 }, -- rob markers for IdleWood house { 326.66299, 1116.79797, 1083.88281, 0, 5 }, { 316.13690, 1117.17993, 1083.88281, 0, 5 }, { 309.62006, 1124.17896, 1083.88281, 0, 5 }, -- rob markers for WilloField house { 2282.04590, -1135.85901, 1050.89844, 1, 11 }, { 2282.36694, -1137.74646, 1050.89844, 1, 11 }, { 2285.44629, -1136.67346, 1050.89844, 1, 11 }, -- rob markers for Ganton house { 248.23495, 301.60382, 999.14844, 0, 1 }, { 243.82597, 301.51428, 999.14844, 0, 1 }, { 248.83932, 305.45200, 999.14844, 0, 1 }, -- rob markers for CJ house { 2491.69287, -1694.92102, 1014.74792, 0, 3 }, { 2500.01343, -1711.35229, 1014.74219, 0, 3 }, { 2494.01831, -1700.84949, 1018.34375, 0, 3 } } function createBlips ( ) local vehicle = getElementModel ( source ) if ( getElementModel ( source ) == 498 ) then loc = math.random ( #locations ) loc2 = math.random ( #markers ) markerX, markerY, markerZ, dim, int = markers[loc2][1], markers[loc2][2], markers[loc2][3], markers[loc2][4], markers[loc2][5] blipX, blipY, blipZ = locations[loc][1], locations[loc][2], locations[loc][3] robMarker = createMarker (markerX, markerY, markerZ, "cylinder", 1.5, 255, 255, 255, 255, getRootElement () ) setElementInterior ( robMarker, 3 ) setElementInterior ( robMarker, 1 ) setElementInterior ( robMarker, 11 ) setElementInterior ( robMarker, 5 ) startBlip = createBlip ( blipX, blipY, blipZ, 32 ) end end addEventHandler ("onClientVehicleEnter", getRootElement (), createBlips ) Error:houserobbery/robbery_c.lua:35 attempt to index field '?' (a nil value) Edited September 14, 2014 by Guest Link to comment
Anubhav Posted September 14, 2014 Share Posted September 14, 2014 local locations = { { 2351.9699707031, -1169.8599853516, 28.035507202148 }, --EastLosSantos { 2166.1999511719, -1671.4699707031, 15.073687553406 }, --house IdleWood { 2483.3798828125, -1996.1899414063, 13.834323883057 }, --house WilloField { 2402.5183105469, -1715.6148681641, 14.1328125 }, --house Ganton { 2495.330078125, -1690.75, 14.765625 } --house CJ } local markers = { -- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1027.97656 }, { 2348.66870, -1186.74658, 1027.97656 }, { 2322.23877, -1183.75879, 1027.97656 }, -- rob markers for IdleWood house { 326.66299, 1116.79797, 1083.88281 }, { 316.13690, 1117.17993, 1083.88281 }, { 309.62006, 1124.17896, 1083.88281 }, -- rob markers for WilloField house { 2282.04590, -1135.85901, 1050.89844 }, { 2282.36694, -1137.74646, 1050.89844 }, { 2285.44629, -1136.67346, 1050.89844 }, -- rob markers for Ganton house { 248.23495, 301.60382, 999.14844 }, { 243.82597, 301.51428, 999.14844 }, { 248.83932, 305.45200, 999.14844 }, -- rob markers for CJ house { 2491.69287, -1694.92102, 1014.74792 }, { 2500.01343, -1711.35229, 1014.74219 }, { 2494.01831, -1700.84949, 1018.34375 } } function createBlips ( ) local vehicle = getElementModel ( source ) if ( getElementModel ( source ) == 498 ) then loc = math.random ( #locations, #markers ) markerX, markerY, markerZ = markers[loc][1], markers[loc][2], markers[loc][3] blipX, blipY, blipZ = locations[loc][1], locations[loc][2], locations[loc][3] robMarker = createMarker ( markerX, markerY, markerZ, "cylinder", 1.5, 255, 255, 255, 175 ) startBlip = createBlipAttachedTo ( robMarker, 32 ) end end addEventHandler ("onClientVehicleEnter", getRootElement (), createBlips ) Link to comment
darhal Posted September 14, 2014 Share Posted September 14, 2014 The problem that markers and locations have same length try this math.random(#locations) Link to comment
DynamicBan Posted September 14, 2014 Author Share Posted September 14, 2014 All of that aint going to work ^ Example, you got house a, b, c. The blip comes at house a, but the marker comes at house b. How do I make it that both of them comes at the same house. I know about createBlipAttachedTo, but thats not going to work out since those markers are inside an interior. Link to comment
darhal Posted September 14, 2014 Share Posted September 14, 2014 Ah now i understand the problem put them on the same table like this {Mx,My,Mz,Bx,By,Bz} which Mx, My, Mz marker pos and Bx,By,Bz blip pos there other solution but this the simplest Link to comment
DynamicBan Posted September 14, 2014 Author Share Posted September 14, 2014 You mean making 1 table instead of 2? Link to comment
DynamicBan Posted September 14, 2014 Author Share Posted September 14, 2014 How does that work Link to comment
darhal Posted September 14, 2014 Share Posted September 14, 2014 Like this Table = { {0, 0, 0, 1, 1, 0}, {1, 2, 3, 2, 2, 2}, } function() local index = math.random(#Table) rMarker = createMarker(Table[index][1], Table[index][2], Table[index][3]) -- those are x, y, z pos rBlip = createBlip(Table[index][4], Table[index][5], Table[index][6]) -- thos bx, by, bz blip pos end note those table positions are not real Link to comment
Et-win Posted September 14, 2014 Share Posted September 14, 2014 local locations = { { 2351.9699707031, -1169.8599853516, 28.035507202148 }, --EastLosSantos } local markers = { -- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1027.97656, 0, 5 , locations[1]}, } Or edit it like this. You only need to edit your script for this. Link to comment
darhal Posted September 14, 2014 Share Posted September 14, 2014 I dont think this will work why ? Cuz first table pos in locations table may not be near the pos 1 in markers table i hope u understand i recommend to re-orginize it to main table Link to comment
DynamicBan Posted September 14, 2014 Author Share Posted September 14, 2014 Like this Table = { {0, 0, 0, 1, 1, 0}, {1, 2, 3, 2, 2, 2}, } function() local index = math.random(#Table) rMarker = createMarker(Table[index][1], Table[index][2], Table[index][3]) -- those are x, y, z pos rBlip = createBlip(Table[index][4], Table[index][5], Table[index][6]) -- thos bx, by, bz blip pos end note those table positions are not real local locations = { { 2351.9699707031, -1169.8599853516, 28.035507202148 }, --EastLosSantos { 2166.1999511719, -1671.4699707031, 15.073687553406 }, --house IdleWood { 2483.3798828125, -1996.1899414063, 13.834323883057 }, --house WilloField { 2402.5183105469, -1715.6148681641, 14.1328125 }, --house Ganton { 2495.330078125, -1690.75, 14.765625 }, --house CJ -- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1026.97656, 0, 5 }, { 2348.66870, -1186.74658, 1026.97656, 0, 5 }, { 2322.23877, -1183.75879, 1026.97656, 0, 5 }, -- rob markers for IdleWood house { 326.66299, 1116.79797, 1082.88281, 0, 5 }, { 316.13690, 1117.17993, 1082.88281, 0, 5 }, { 309.62006, 1124.17896, 1082.88281, 0, 5 }, -- rob markers for WilloField house { 2282.04590, -1135.85901, 1049.89844, 1, 11 }, { 2282.36694, -1137.74646, 1049.89844, 1, 11 }, { 2285.44629, -1136.67346, 1049.89844, 1, 11 }, -- rob markers for Ganton house { 248.23495, 301.60382, 998.14844, 0, 1 }, { 243.82597, 301.51428, 998.14844, 0, 1 }, { 248.83932, 305.45200, 998.14844, 0, 1 }, -- rob markers for CJ house { 2491.69287, -1694.92102, 1013.74792, 0, 3 }, { 2500.01343, -1711.35229, 1013.74219, 0, 3 }, { 2494.01831, -1700.84949, 1017.34375, 0, 3 } } function createBlips ( ) local vehicle = getElementModel ( source ) if ( getElementModel ( source ) == 498 ) then loc = math.random ( #locations ) robMarker = createMarker ( locations[loc][1], locations[loc][2], locations[loc][3], locations[loc][4], locations[loc][5] ) setElementInterior ( robMarker, 3 ) setElementInterior ( robMarker, 1 ) setElementInterior ( robMarker, 11 ) setElementInterior ( robMarker, 5 ) startBlip = createBlip ( locations[loc][1], locations[loc][2], locations[loc][3] ) end end addEventHandler ("onClientVehicleEnter", getRootElement (), createBlips ) Im getting this debug Link to comment
darhal Posted September 14, 2014 Share Posted September 14, 2014 Line 33 replace this line with robMarker = createMarker(locations[loc][1], locations[loc][2], locations[loc][3]) Link to comment
DynamicBan Posted September 14, 2014 Author Share Posted September 14, 2014 It creates the blip at random places around the map. It's not creating the blip at the house, but instead at the markers. Link to comment
Moderators IIYAMA Posted September 14, 2014 Moderators Share Posted September 14, 2014 Make 2 tables. One with the markers and one with the blips. Link to comment
DynamicBan Posted September 14, 2014 Author Share Posted September 14, 2014 Make 2 tables. One with the markers and one with the blips. I did that. ( check first post ) Example, you got house a, b, c. The blip comes at house a, but the marker comes at house b. Link to comment
Moderators IIYAMA Posted September 14, 2014 Moderators Share Posted September 14, 2014 or what about this table construction. If you want to have the markers of other houses, you can also move markers(tables) to other houses. as your example, move per house one marker(table) to another houses. But I leave that to you. local locations = { {--EastLosSantos ["blip"]={ 2351.9699707031, -1169.8599853516, 28.035507202148 }, ["markers"]={-- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1027.97656, 0, 5 }, { 2348.66870, -1186.74658, 1027.97656, 0, 5 }, { 2322.23877, -1183.75879, 1027.97656, 0, 5 } } }, {--house IdleWood ["blip"]={ 2166.1999511719, -1671.4699707031, 15.073687553406 }, ["markers"]={-- rob markers for IdleWood house { 326.66299, 1116.79797, 1083.88281, 0, 5 }, { 316.13690, 1117.17993, 1083.88281, 0, 5 }, { 309.62006, 1124.17896, 1083.88281, 0, 5 } } }, {--house WilloField ["blip"]={ 2483.3798828125, -1996.1899414063, 13.834323883057 }, ["markers"]={-- rob markers for WilloField house { 2282.04590, -1135.85901, 1050.89844, 1, 11 }, { 2282.36694, -1137.74646, 1050.89844, 1, 11 }, { 2285.44629, -1136.67346, 1050.89844, 1, 11 } } }, {--house Ganton ["blip"]={ 2402.5183105469, -1715.6148681641, 14.1328125 }, ["markers"]={-- rob markers for Ganton house { 248.23495, 301.60382, 999.14844, 0, 1 }, { 243.82597, 301.51428, 999.14844, 0, 1 }, { 248.83932, 305.45200, 999.14844, 0, 1 } } }, {--house CJ ["blip"]={ 2495.330078125, -1690.75, 14.765625 }, ["markers"]={-- rob markers for CJ house { 2491.69287, -1694.92102, 1014.74792, 0, 3 }, { 2500.01343, -1711.35229, 1014.74219, 0, 3 }, { 2494.01831, -1700.84949, 1018.34375, 0, 3 } } } } --------------------------------------------------------------------------------- local location = locations[math.random(#locations)] -- content of location (table) local blipLocation = location["blip"]-- table local blipX, blipY, blipZ = blipLocation[1],blipLocation[2],blipLocation[3] local markerTable = location["markers"] -- marker tables local markerLocation = markerTable[math.random(#markerTable)] -- table local markerX, markerY, markerZ, dim, int = markerLocation[1],markerLocation[2],markerLocation[3],markerLocation[4],markerLocation[5] Link to comment
darhal Posted September 15, 2014 Share Posted September 15, 2014 Simply and without more bla bala delte the blips table and use this function createBlipAttachedTo Link to comment
DynamicBan Posted September 15, 2014 Author Share Posted September 15, 2014 Simply and without more bla bala delte the blips table and use this function createBlipAttachedTo That aint going to work, because the markers are inside in an int. or what about this table construction. If you want to have the markers of other houses, you can also move markers(tables) to other houses. as your example, move per house one marker(table) to another houses. But I leave that to you. local locations = { {--EastLosSantos ["blip"]={ 2351.9699707031, -1169.8599853516, 28.035507202148 }, ["markers"]={-- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1027.97656, 0, 5 }, { 2348.66870, -1186.74658, 1027.97656, 0, 5 }, { 2322.23877, -1183.75879, 1027.97656, 0, 5 } } }, {--house IdleWood ["blip"]={ 2166.1999511719, -1671.4699707031, 15.073687553406 }, ["markers"]={-- rob markers for IdleWood house { 326.66299, 1116.79797, 1083.88281, 0, 5 }, { 316.13690, 1117.17993, 1083.88281, 0, 5 }, { 309.62006, 1124.17896, 1083.88281, 0, 5 } } }, {--house WilloField ["blip"]={ 2483.3798828125, -1996.1899414063, 13.834323883057 }, ["markers"]={-- rob markers for WilloField house { 2282.04590, -1135.85901, 1050.89844, 1, 11 }, { 2282.36694, -1137.74646, 1050.89844, 1, 11 }, { 2285.44629, -1136.67346, 1050.89844, 1, 11 } } }, {--house Ganton ["blip"]={ 2402.5183105469, -1715.6148681641, 14.1328125 }, ["markers"]={-- rob markers for Ganton house { 248.23495, 301.60382, 999.14844, 0, 1 }, { 243.82597, 301.51428, 999.14844, 0, 1 }, { 248.83932, 305.45200, 999.14844, 0, 1 } } }, {--house CJ ["blip"]={ 2495.330078125, -1690.75, 14.765625 }, ["markers"]={-- rob markers for CJ house { 2491.69287, -1694.92102, 1014.74792, 0, 3 }, { 2500.01343, -1711.35229, 1014.74219, 0, 3 }, { 2494.01831, -1700.84949, 1018.34375, 0, 3 } } } } --------------------------------------------------------------------------------- local location = locations[math.random(#locations)] -- content of location (table) local blipLocation = location["blip"]-- table local blipX, blipY, blipZ = blipLocation[1],blipLocation[2],blipLocation[3] local markerTable = location["markers"] -- marker tables local markerLocation = markerTable[math.random(#markerTable)] -- table local markerX, markerY, markerZ, dim, int = markerLocation[1],markerLocation[2],markerLocation[3],markerLocation[4],markerLocation[5] The markers still don't spawn at the blip, they spawn in a different house than they should. Link to comment
darhal Posted September 15, 2014 Share Posted September 15, 2014 Makeeeee one table like this Table = { {0, 0, 0, 0, 0, 0} } first 3 arg are marker pos and the rest blip pos why u dont understand read my example that i gave correctly plzzz Link to comment
DynamicBan Posted September 15, 2014 Author Share Posted September 15, 2014 I did that local locations = { -- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1026.97656, 0, 5, 2351.9699707031, -1169.8599853516, 28.035507202148 }, { 2348.66870, -1186.74658, 1026.97656, 0, 5, 2351.9699707031, -1169.8599853516, 28.035507202148 }, { 2322.23877, -1183.75879, 1026.97656, 0, 5, 2351.9699707031, -1169.8599853516, 28.035507202148 }, -- rob markers for IdleWood house { 326.66299, 1116.79797, 1082.88281, 0, 5, 2166.1999511719, -1671.4699707031, 15.073687553406 }, { 316.13690, 1117.17993, 1082.88281, 0, 5, 2166.1999511719, -1671.4699707031, 15.073687553406 }, { 309.62006, 1124.17896, 1082.88281, 0, 5, 2166.1999511719, -1671.4699707031, 15.073687553406 }, -- rob markers for WilloField house { 2282.04590, -1135.85901, 1049.89844, 1, 11, 2483.3798828125, -1996.1899414063, 13.834323883057 }, { 2282.36694, -1137.74646, 1049.89844, 1, 11, 2483.3798828125, -1996.1899414063, 13.834323883057 }, { 2285.44629, -1136.67346, 1049.89844, 1, 11, 2483.3798828125, -1996.1899414063, 13.834323883057 }, -- rob markers for Ganton house { 248.23495, 301.60382, 998.14844, 0, 1, 2402.5183105469, -1715.6148681641, 14.1328125 }, { 243.82597, 301.51428, 998.14844, 0, 1, 2402.5183105469, -1715.6148681641, 14.1328125 }, { 248.83932, 305.45200, 998.14844, 0, 1, 2402.5183105469, -1715.6148681641, 14.1328125 }, -- rob markers for CJ house { 2491.69287, -1694.92102, 1013.74792, 0, 3, 2495.330078125, -1690.75, 14.765625 }, { 2500.01343, -1711.35229, 1013.74219, 0, 3, 2495.330078125, -1690.75, 14.765625 }, { 2494.01831, -1700.84949, 1017.34375, 0, 3, 2495.330078125, -1690.75, 14.765625 } } function createBlips ( ) local vehicle = getElementModel ( source ) if ( getElementModel ( source ) == 498 ) then loc = math.random ( #locations ) robMarker = createMarker (locations[loc][1], locations[loc][2], locations[loc][3], locations[loc][4], locations[loc][5]) setElementInterior ( robMarker, 3 ) setElementInterior ( robMarker, 1 ) setElementInterior ( robMarker, 11 ) setElementInterior ( robMarker, 5 ) startBlip = createBlip(locations[loc][6], locations[loc][7], locations[loc][8]) end end addEventHandler ("onClientVehicleEnter", getRootElement (), createBlips ) Link to comment
darhal Posted September 15, 2014 Share Posted September 15, 2014 U passes wrong arguments replace createMarker and createBlip with this please test it fast createMarker(locations[loc][1], locations[loc][2], locations[loc][3]) createBlip(locations[loc][4], locations[loc][5], locations[loc][6]) Link to comment
darhal Posted September 15, 2014 Share Posted September 15, 2014 U passes wrong arguments replace createMarker and createBlip with this please test it fast createMarker(locations[loc][1], locations[loc][2], locations[loc][3]) createBlip(locations[loc][4], locations[loc][5], locations[loc][6]) Link to comment
Moderators IIYAMA Posted September 15, 2014 Moderators Share Posted September 15, 2014 or what about this table construction. If you want to have the markers of other houses, you can also move markers(tables) to other houses. as your example, move per house one marker(table) to another houses. But I leave that to you. local locations = { {--EastLosSantos ["blip"]={ 2351.9699707031, -1169.8599853516, 28.035507202148 }, ["markers"]={-- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1027.97656, 0, 5 }, { 2348.66870, -1186.74658, 1027.97656, 0, 5 }, { 2322.23877, -1183.75879, 1027.97656, 0, 5 } } }, {--house IdleWood ["blip"]={ 2166.1999511719, -1671.4699707031, 15.073687553406 }, ["markers"]={-- rob markers for IdleWood house { 326.66299, 1116.79797, 1083.88281, 0, 5 }, { 316.13690, 1117.17993, 1083.88281, 0, 5 }, { 309.62006, 1124.17896, 1083.88281, 0, 5 } } }, {--house WilloField ["blip"]={ 2483.3798828125, -1996.1899414063, 13.834323883057 }, ["markers"]={-- rob markers for WilloField house { 2282.04590, -1135.85901, 1050.89844, 1, 11 }, { 2282.36694, -1137.74646, 1050.89844, 1, 11 }, { 2285.44629, -1136.67346, 1050.89844, 1, 11 } } }, {--house Ganton ["blip"]={ 2402.5183105469, -1715.6148681641, 14.1328125 }, ["markers"]={-- rob markers for Ganton house { 248.23495, 301.60382, 999.14844, 0, 1 }, { 243.82597, 301.51428, 999.14844, 0, 1 }, { 248.83932, 305.45200, 999.14844, 0, 1 } } }, {--house CJ ["blip"]={ 2495.330078125, -1690.75, 14.765625 }, ["markers"]={-- rob markers for CJ house { 2491.69287, -1694.92102, 1014.74792, 0, 3 }, { 2500.01343, -1711.35229, 1014.74219, 0, 3 }, { 2494.01831, -1700.84949, 1018.34375, 0, 3 } } } } --------------------------------------------------------------------------------- local location = locations[math.random(#locations)] -- content of location (table) local blipLocation = location["blip"]-- table local blipX, blipY, blipZ = blipLocation[1],blipLocation[2],blipLocation[3] local markerTable = location["markers"] -- marker tables local markerLocation = markerTable[math.random(#markerTable)] -- table local markerX, markerY, markerZ, dim, int = markerLocation[1],markerLocation[2],markerLocation[3],markerLocation[4],markerLocation[5] The markers still don't spawn at the blip, they spawn in a different house than they should. I took your table and changed it in a useful table. If so then you gave me incorrect marker locations. Reinsert the marker locations till those are correct. Link to comment
DynamicBan Posted September 15, 2014 Author Share Posted September 15, 2014 Works, thanks alot. But the marker is a checkpoint right now, I tried robMarker = createMarker (locations[loc][1], locations[loc][2], locations[loc][3], "cylinder", 1.5, 255, 255, 255, 150) to change it into a cylinder but then the marker doesn't show up. or what about this table construction. If you want to have the markers of other houses, you can also move markers(tables) to other houses. as your example, move per house one marker(table) to another houses. But I leave that to you. local locations = { {--EastLosSantos ["blip"]={ 2351.9699707031, -1169.8599853516, 28.035507202148 }, ["markers"]={-- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1027.97656, 0, 5 }, { 2348.66870, -1186.74658, 1027.97656, 0, 5 }, { 2322.23877, -1183.75879, 1027.97656, 0, 5 } } }, {--house IdleWood ["blip"]={ 2166.1999511719, -1671.4699707031, 15.073687553406 }, ["markers"]={-- rob markers for IdleWood house { 326.66299, 1116.79797, 1083.88281, 0, 5 }, { 316.13690, 1117.17993, 1083.88281, 0, 5 }, { 309.62006, 1124.17896, 1083.88281, 0, 5 } } }, {--house WilloField ["blip"]={ 2483.3798828125, -1996.1899414063, 13.834323883057 }, ["markers"]={-- rob markers for WilloField house { 2282.04590, -1135.85901, 1050.89844, 1, 11 }, { 2282.36694, -1137.74646, 1050.89844, 1, 11 }, { 2285.44629, -1136.67346, 1050.89844, 1, 11 } } }, {--house Ganton ["blip"]={ 2402.5183105469, -1715.6148681641, 14.1328125 }, ["markers"]={-- rob markers for Ganton house { 248.23495, 301.60382, 999.14844, 0, 1 }, { 243.82597, 301.51428, 999.14844, 0, 1 }, { 248.83932, 305.45200, 999.14844, 0, 1 } } }, {--house CJ ["blip"]={ 2495.330078125, -1690.75, 14.765625 }, ["markers"]={-- rob markers for CJ house { 2491.69287, -1694.92102, 1014.74792, 0, 3 }, { 2500.01343, -1711.35229, 1014.74219, 0, 3 }, { 2494.01831, -1700.84949, 1018.34375, 0, 3 } } } } --------------------------------------------------------------------------------- local location = locations[math.random(#locations)] -- content of location (table) local blipLocation = location["blip"]-- table local blipX, blipY, blipZ = blipLocation[1],blipLocation[2],blipLocation[3] local markerTable = location["markers"] -- marker tables local markerLocation = markerTable[math.random(#markerTable)] -- table local markerX, markerY, markerZ, dim, int = markerLocation[1],markerLocation[2],markerLocation[3],markerLocation[4],markerLocation[5] The markers still don't spawn at the blip, they spawn in a different house than they should. I took your table and changed it in a useful table. If so then you gave me incorrect marker locations. Reinsert the marker locations till those are correct. Those locations are correct. Its working now. Thanks for your help anyway, Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now