Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Sign in to follow this  
gt500

Delete Out Of Bounds Vehicles?

Recommended Posts

I'm using Pwnoz0r's DayZ Private Server Pack, which apparently does not include any sort of script to delete vehicles that have been left outside the normal boundaries of the map.

I had asked on OpenDayZ.net about this, but the thread isn't getting any attention, so I figured I'd ask here as well.

Pwnoz0r's DayZ Private Server Pack uses a script in the MySQL (technically I think it calls itself InnoDB but everything seems to treat it as MySQL) database called pCleanup to perform certain cleanup functions on startup, and this script is called from pMain which handles spawning of vehicles. Vehicle locations are stored in a format that looks like this:

[239,[4896.77,10135.8,0.081]]

What I need to be able to do is modify the pCleanup to check the 'Worldspace' column for each vehicle in the database, determine if the vehicle is outside of the map (presumably by checking if the X or Y are negative), and then delete a vehicle where that returns true.

I guess the basic syntax would be something like this:

  DELETE
FROM object_data
WHERE <vehicle is outside of map>

Obviously I have no clue how to write the part where it determines if a vehicle is outside of the map, so if someone could give me a hand with that, then that would be awesome. ;)

Edited by GT500

Share this post


Link to post
Share on other sites
Sign in to follow this  

×