Gabriel1375 Posted March 30, 2017 Posted March 30, 2017 Hello, my MTA DayZ server is lagging because it has a lot of players, and a lot of flying items because these players remove these items from inventory when spawning on parachute... How can i do a resource that clean these flying or also all items ? I've seen this in a server, i think they said it's made using col shape... Ty!!!
Mr.Loki Posted March 30, 2017 Posted March 30, 2017 For each object get its distance from the ground if it's > 2 for example just delete its parent and then itself. getElementByType getDistancebetweenPoinrs3D getElementData destroyElement
Gabriel1375 Posted April 1, 2017 Author Posted April 1, 2017 But the objects it's on different distances from the ground... Don't have an exact distance to say it in the script, i have to make like an radius ?
NeXuS™ Posted April 1, 2017 Posted April 1, 2017 I think what you could do, is 1. getElementsByType("colshape") 2. Cycle through them by for 3. Create a vehicle by createVehicle on their positions 4. Check if that vehicle is on the ground 5. Destroy the vehicle 6. If it was on the ground, don't do anything 7 If it wasn't, destroy the colshape.
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