Skip to content

[Feature Request] onInitFinal - A event called when all lua states have been initialized #434

@OfficialLambdax

Description

@OfficialLambdax

Is your feature request related to a problem? Please describe.
When Lua states want to communicate with each other then they have to wait for the other to exist. So if a script wants to eg register, request or send data during eg onInit

MP.TriggerGlobalEvent("myEvent", "hey im here")

then this event will only reach the target state when it has been initialized already.

For example imagine a single state that manages all server wide script settings. Now each script state has to request that data, but has to make sure the options state is already present. Currently there is no way to ensure a or all states are fully loaded.

An event like onInitFinal that is fired once all states have been fully loaded and executed with onInit would solve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions