1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

DarkRP: Add postLoadCustomDarkRPItems

Discussion in 'Development Stream' started by Bot, Aug 15, 2019.

  1. Bot


    By: Kefta
    Add postLoadCustomDarkRPItems

    I am writing an entity for DarkRP that can only be registered after all teams have been loaded. This is not guaranteed by
    a loadCustomDarkRPItems hook due to unpredictable hook ordering. Though a timer would work, I also want the entity to be registered by the time map entities are loaded so I don't have to do extra hacks to recreate them after InitPostEntity.

    GAMEMODE -> self when passing to hook.Call to support custom GAMEMODE tables (``GAMEMODE.DarkRPFinishedLoading(MY_CUSTOM_GM_TABLE)`` or ``local GM = setmetatable({}, {__index = GAMEMODE}) GM:DarkRPFinishedLoading()``). This should really be done across the entire gamemode.

    Detailed information on Github

Share This Page