mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Add new event: onResourceStateChange

Open TracerDS opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Following #3304 there should be an event for tracking state changes of all resources. onResourceLoadStateChange only triggers for load changes (aka removing and creating a resource)

Describe the solution you'd like

onResourceStateChange would trigger when a resource has been stopped, started or refreshed

Describe alternatives you've considered

No response

Additional context

No response

Security Policy

  • [X] I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.

TracerDS avatar Jan 30 '24 16:01 TracerDS

How is this event going to behave any different than onResourceStart/onResourceStop?

R4ven47 avatar Jan 30 '24 17:01 R4ven47

How is this event going to behave any different than onResourceStart/onResourceStop?

it would be much easier to communicate between one event handler and 2 separate event handlers. With that function you will have more flexibility with managing your resources

TracerDS avatar Jan 30 '24 19:01 TracerDS