WTF_ Posted December 27, 2017 Share Posted December 27, 2017 local place = { {-1393.91028, 2657.92627, 671.45751}, {1.77779, 1177.08386, 633.51682}, {1205.34155, 1237.04736, 626.15211}, } local marker = createMarker ( 2.45116, 32.87801, 1200.59375 ,"arrow" , 1.5 , 255 , 100 , 60 ) addEventHandler( "onMarkerHit" , root , function ( hitElement ) if getElementType ( hitElement ) == 'player' and marker == source then for i ,v in ipairs ( place ) do setElementPosition ( hitElement ,math.random ( unpack( v [ 1 ] , v [ 2 ] , v [ 3 ] ) )) end end end ) مساعدة يا شباب مسوي جدول و ابيه لما يلمس الماركر يسحبه لكان عشوائي منهم Link to comment
Doffy Posted December 27, 2017 Share Posted December 27, 2017 (edited) local place = { {-1393.91028, 2657.92627, 671.45751}, {1.77779, 1177.08386, 633.51682}, {1205.34155, 1237.04736, 626.15211}, } local marker = createMarker ( 2.45116, 32.87801, 1200.59375 ,"arrow" , 1.5 , 255 , 100 , 60 ) addEventHandler( "onMarkerHit" , root , function ( hitElement ) if getElementType ( hitElement ) == 'player' and marker == source then for i ,v in ipairs ( place ) do setElementPosition ( hitElement ,math.random ( unpack( v [ 1 ] , v [ 2 ] , v [ 3 ] ) )) end end end ) مش محتاج انك تسوي لوب جرب local place = { {-1393.91028, 2657.92627, 671.45751}, {1.77779, 1177.08386, 633.51682}, {1205.34155, 1237.04736, 626.15211}, } local marker = createMarker ( 2.45116, 32.87801, 1200.59375 ,"arrow" , 1.5 , 255 , 100 , 60 ) addEventHandler( "onMarkerHit" , root , function ( hitElement ) if getElementType ( hitElement ) == 'player' and marker == source then local pos = math.random(1,3) setElementPosition ( hitElement, place[pos][1], place[pos][2],place[pos][3]) end end ); Edited December 27, 2017 by #Himoo Link to comment
Rockyz Posted December 27, 2017 Share Posted December 27, 2017 50 minutes ago, #Himoo said: local place = { {-1393.91028, 2657.92627, 671.45751}, {1.77779, 1177.08386, 633.51682}, {1205.34155, 1237.04736, 626.15211}, } local marker = createMarker ( 2.45116, 32.87801, 1200.59375 ,"arrow" , 1.5 , 255 , 100 , 60 ) addEventHandler( "onMarkerHit" , root , function ( hitElement ) if getElementType ( hitElement ) == 'player' and marker == source then for i ,v in ipairs ( place ) do setElementPosition ( hitElement ,math.random ( unpack( v [ 1 ] , v [ 2 ] , v [ 3 ] ) )) end end end ) مش محتاج انك تسوي لوب جرب local place = { {-1393.91028, 2657.92627, 671.45751}, {1.77779, 1177.08386, 633.51682}, {1205.34155, 1237.04736, 626.15211}, } local marker = createMarker ( 2.45116, 32.87801, 1200.59375 ,"arrow" , 1.5 , 255 , 100 , 60 ) addEventHandler( "onMarkerHit" , root , function ( hitElement ) if getElementType ( hitElement ) == 'player' and marker == source then local pos = math.random(1,3) setElementPosition ( hitElement, place[pos][1], place[pos][2],place[pos][3]) end end ); local pos = math.random(#place) Link to comment
WTF_ Posted December 27, 2017 Author Share Posted December 27, 2017 55 minutes ago, #,+( _xiRoc[K]; > said: 1 hour ago, #Himoo said: مش محتاج انك تسوي لوب جرب أخوي في كل من الكودين بيجيب لي قيمة تلقائية من المكان الأول وقيمة تلقائية من المكان لاثاني و تلقائية من المكان الثالث أبيه يسحب لي قيمة أولى كاملة او القيمة ثانية كاملة او الثالثة بس وحدة منهم بشكل عشوائي Link to comment
Doffy Posted December 27, 2017 Share Posted December 27, 2017 5 hours ago, #,+( _xiRoc[K]; > said: local pos = math.random(#place) 5 hours ago, #,+( _xiRoc[K]; > said: local pos = math.random(#place) جربت الكود حقي اولا ؟ Link to comment
Rockyz Posted December 27, 2017 Share Posted December 27, 2017 1 hour ago, #Himoo said: جربت الكود حقي اولا ؟ انا ماقلت انه صح او غلط .. انا فقط اختصرت الموضوع اذا يبي يضيف احداثيات اكثر + ليش اجرب كودك اصلا ؟ Link to comment
Master_MTA Posted December 31, 2017 Share Posted December 31, 2017 On 12/27/2017 at 14:21, WTF_ said: شباب local place = { {-1393.91028, 2657.92627, 671.45751}, {1.77779, 1177.08386, 633.51682}, {1205.34155, 1237.04736, 626.15211}, } local marker = createMarker ( 2.45116, 32.87801, 1200.59375 ,"arrow" , 1.5 , 255 , 100 , 60 ) addEventHandler( "onMarkerHit" , root , function ( hitElement ) if getElementType ( hitElement ) == 'player' and marker == source then local pos=math.random(#place) setElementPosition ( hitElement , unpack(place[pos])) end end ) 1 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