Jump to content

table.insert - تصحيح لـ


Recommended Posts

سلام عليكم

معي استفسار عن table.insert

الحين انا حاطط قيميتين في رو وضايفهم للجدول

القيميتن ماركر وسيارة

لما ابي احذف الماركر والسيارة كيف احذفهم مع اللوب

table.insert(vehiclesTablee,{carr,markk})
--- هادي الطريقة ما ظبطت
function ()
for i,v in ipairs(vehiclesTablee) do
destroyElement(v)
end
end

 

Link to comment
22 hours ago, Master_MTA said:

كود الانزرت ورني اياه هو وكود انشاء السياره

-- يحذفهم نصهم بس
table.insert(vehiclesTablee,{marker2,marker,obj})

addCommandHandler("re",
	function(source)
		for i,v in ipairs(vehiclesTablee) do
			destroyElement(v[1])
				destroyElement(v[2])
					destroyElement(v[3])
				outputChatBox("done remove",root,255,255,255,true)
			table.remove(vehiclesTablee,1)
		end
	end
)

 

Link to comment

addCommandHandler("re",
	function(source)
		for i,v in ipairs(vehiclesTablee) do
			destroyElement(v[1])
				destroyElement(v[2])
					destroyElement(v[3])
				outputChatBox("done remove",root,255,255,255,true)
		end
		for i,v in ipairs(vehiclesTablee) do
			table.remove(vehiclesTablee,i)
		end

  end
)

صراحه ما ادري كيف ما زبط معك اللي فوق لكن جرب ذا

 

1 hour ago, Mr.Mostafa said:
  •  
  •  

 

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