Jump to content

[HELP] Delete empty tents


Daniels69

Recommended Posts

Posted

I'm wondering how do i check if the tent is empty (in dayz)?
Have no idea..
maybe some one knows? 
the part what i've made

 

		for _,col in ipairs(getElementsByType("colshape")) do
		if getElementData(col, "tent") then
			local tent = getElementData(col, "parent");
			if tent then
				local x,y,z = getElementPosition(tent);
				local rX,rY,rZ = getElementRotation(tent);

i just want to check if the tent is empty, and then delete it.. can any one help me with this?

Posted (edited)

You could cycle through all items via a for cycle and if every item equals to 0 in it, just delete it.

Edited by Patrik91

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