Jump to content

مساعدة في لوب


Recommended Posts

2 minutes ago, The Dragon said:

السلام عليكم ابي استفسر عن عمل شئ

كيف اسوي لوب تصنع كل السيارات الي في التيبل؟

PositionsTableName = {
    {x,y,z}, -- احداثيات المكان الاول
    {x2,y2,z2} -- احداثيات المكان الثاني
}

TableName2 = {} 

function StartVehicle( )
    for i,v in ipairs( PositionsTableName ) do
        TableName2[#TableName2+1] = createVehicle(model,v[1],v[2],v[3])
    end
end
StartVehicle( )

 

  • Like 1
Link to comment

ممكن تعطيني مثال؟

1 minute ago, Kas7 said:

PositionsTableName = {
    {x,y,z}, -- احداثيات المكان الاول
    {x2,y2,z2} -- احداثيات المكان الثاني
}

TableName2 = {} 

function StartVehicle( )
    for i,v in ipairs( PositionsTableName ) do
        TableName2[#TableName2+1] = createVehicle(model,v[1],v[2],v[3])
    end
end
StartVehicle( )

 

 

Link to comment
PositionsCreateVehicle = {
    {2782.01514, -2474.73535, 13.63507},
	{2804.32544, -2474.68701, 13.63008}
}

CreateVehicle = {} 

function StartVehicle( )
    for i,v in ipairs( PositionsCreateVehicle ) do
        CreateVehicle[#CreateVehicle+1] = createVehicle(421,v[1],v[2],v[3],359.5, 0.000, 0)
    end
end
StartVehicle( )

جرب

  • Thanks 1
Link to comment
1 minute ago, Kas7 said:

PositionsCreateVehicle = {
    {2782.01514, -2474.73535, 13.63507},
	{2804.32544, -2474.68701, 13.63008}
}

CreateVehicle = {} 

function StartVehicle( )
    for i,v in ipairs( PositionsCreateVehicle ) do
        CreateVehicle[#CreateVehicle+1] = createVehicle(421,v[1],v[2],v[3],359.5, 0.000, 0)
    end
end
StartVehicle( )

جرب

يب شكرا والله اشتغلت شكرا

Link to comment
Just now, The Dragon said:

يب شكرا والله اشتغلت شكرا

حاول تجرب وتستكشف وتطبق اكثر من مثال لان كل ما تدرب اكثر علي الكود كل ما يسهل عليك التعلم اسرع
+ بالتوفيق

  • Thanks 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...