💰 Improved Entity Money Drop System for Ped Death Events#101
Merged
bitpredator merged 2 commits intomasterfrom Jul 14, 2025
Merged
💰 Improved Entity Money Drop System for Ped Death Events#101bitpredator merged 2 commits intomasterfrom
bitpredator merged 2 commits intomasterfrom
Conversation
### Summary This pull request optimizes the server-client logic for handling money drops when an entity (ped) is killed in-game. It introduces a cleaner and safer approach to detecting proximity pickup events and managing pickup cleanup. --- ### ✅ Changes Implemented - Refactored `gameEventTriggered` handler to improve performance and readability. - Ensured cleanup of money pickup after 15 seconds if not collected. - Improved distance check logic and reduced CPU usage with smarter `Wait()` handling. - Replaced generic flags with clear, readable variable names. - Added validation for entity existence before operating on it. --- ### 🛡️ Benefits - Reduces unnecessary server load. - Prevents pickup duplication or memory leaks. - Ensures secure and proximity-verified rewards. - Improves future maintainability of the code. --- ### 📌 Related - Server-side improvements in `money:allowPickupNear` and `money:tryPickup`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request optimizes the server-client logic for handling money drops when an entity (ped) is killed in-game. It introduces a cleaner and safer approach to detecting proximity pickup events and managing pickup cleanup.
✅ Changes Implemented
gameEventTriggeredhandler to improve performance and readability.Wait()handling.🛡️ Benefits
📌 Related
money:allowPickupNearandmoney:tryPickup.