Skip to content

Commit 1a514cb

Browse files
committed
Add debug logging for object rendering and removal
1 parent bb663a5 commit 1a514cb

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
G'day! Welcome to the official repository for Glitch Spawn Objects! This is a handy FiveM resource that lets you spawn and sync persistent objects across your server. Whether you need to place props, furniture, or any other objects that need to stick around, this resource has got you sorted.
44

5-
## Features
5+
## 🌟 Features
66

77
- **Persistent Objects**: Spawn objects that stay exactly where you put them, even after server restarts
88
- **Synchronised Spawning**: All players see the same objects in the same spots
@@ -15,14 +15,20 @@ G'day! Welcome to the official repository for Glitch Spawn Objects! This is a ha
1515
For detailed setup instructions and usage examples, check out our documentation:
1616
[https://glitchstudios.gitbook.io/glitch-studios/free-resources/glitch-spawn-objects](https://glitchstudios.gitbook.io/glitch-studios/free-resources/glitch-spawn-objects)
1717

18-
## Installation
18+
## 📷 Showcase
19+
20+
[![Glitch Spawn Objects Showcase](https://img.youtube.com/vi/E7-THYpyLZs/0.jpg)](https://www.youtube.com/watch?v=E7-THYpyLZs)
21+
22+
*If the preview above doesn't load, you can watch the showcase video here: https://www.youtube.com/watch?v=E7-THYpyLZs*
23+
24+
## 🛠️ Installation
1925

2026
1. Download the resource and extract it to your `resources` folder.
2127
2. Add `ensure glitch-spawnobjects` to your `server.cfg`.
2228
3. Configure your settings in the config file.
2329
4. Restart your server and you're good to go!
2430

25-
## Support
31+
## 🆘 Support
2632

2733
Need a hand? Got a suggestion? We're here to help!
2834

@@ -32,7 +38,7 @@ Need a hand? Got a suggestion? We're here to help!
3238

3339
Discord: https://discord.gg/PAQX8ANEfw
3440

35-
## Special Thanks
41+
## Special Thanks
3642

3743
A massive shoutout to the brilliant developers whose work made this resource possible! Your contributions to the FiveM community are absolutely legendary:
3844

client/main.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ CreateThread(function()
3636
end
3737

3838
SetModelAsNoLongerNeeded(object.model)
39+
40+
if Config.Debug then
41+
print(string.format("^2[DEBUG] Rendered Object: %s (ID: %s) at %.2f, %.2f, %.2f^0",
42+
object.model, object.id or "Unknown", object.posX, object.posY, object.posZ))
43+
end
3944
end)
4045
end
4146
elseif object.isRendered then
@@ -45,6 +50,11 @@ CreateThread(function()
4550
object.object = nil
4651
CreateThread(function()
4752
removeObject(objToRemove)
53+
54+
if Config.Debug then
55+
print(string.format("^1[DEBUG] Removed Object: %s (ID: %s) from %.2f, %.2f, %.2f^0",
56+
object.model, object.id or "Unknown", object.posX, object.posY, object.posZ))
57+
end
4858
end)
4959
end
5060
end

0 commit comments

Comments
 (0)