Return Ped Entity from spawnPed Function for Improved Management and Deletion #209
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.
Describe Pull Request
This pull request addresses the issue where the
spawnPed
function does not return the ped entity, which prevents proper management and deletion of the peds after they are spawned. By updating the function to return the ped, it will allow developers to manage spawned peds more effectively, including actions like tracking, modifying, or deleting them later in the script.What this PR adds or fixes:
spawnPed
function now returns the ped entity after creation.This change ensures better ped lifecycle management, especially in scenarios where multiple peds are created and need to be tracked or handled individually.
Issue
This PR fixes the issue where peds created by the
spawnPed
function were not returned, making it difficult to control or delete them later.Questions: