Jump to content

مساعدة في setElementPosition


WTF_

Recommended Posts

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
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 by #Himoo
Link to comment
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
55 minutes ago, #,+( _xiRoc[K]; > said:

 

 

1 hour ago, #Himoo said:

مش محتاج انك تسوي لوب 

جرب


 

أخوي في كل من الكودين بيجيب لي قيمة تلقائية من المكان الأول وقيمة تلقائية من المكان لاثاني و تلقائية من المكان الثالث

أبيه يسحب لي قيمة أولى كاملة او القيمة ثانية كاملة او الثالثة 

بس وحدة منهم بشكل عشوائي

Link to comment
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 
)

 

  • Like 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...