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.
Description:
This PR improves the management of in-service players, integrates better structure for service handling, and enhances security and data integrity all-around.
Key Changes:
Service Structure Refactor:
Service
class, offering better abstraction and organization.services
table, with each service having its own methods for adding/removing players, counting players, and sending notifications.Job Duty Management:
setPlayerJobDuty
, has been introduced to set players' job duty status when they join/leave a service.On-Duty Consistency Across MaxPlayers Limit:
onDuty
throughxPlayer.setJob()
will be added to the jobs service even if this exceeds the servicesmaxPlayers
, ensuring consistency between job duty status and service membership.esx_service
. Properly reflecting all on-duty players takes precedence over enforcing a servicesmaxPlayers
limitations.Breaking Changes:
Removal of
esx_service:notifyAllInService
Over Network:esx_service:notifyAllInService
event has been removed from being triggered over the network.Removal of
esx_service:activateService
Over Network:esx_service:activateService
event is no longer available over the network for the same security reasons.Improved Notification System:
Service Management Enhancements:
Client-Side Mugshot Display Fix:
Testing: