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.

[Solved] No Legacy notifications from the gamemode are showing up?

Discussion in 'DarkRP Modding Questions & Help' started by AG [ LittleBigBug_ ], Jun 2, 2016.

  1. Really just what the title says, you know the ones usually triggered by notification.AddLegacy but it looks like Falco made a function for himself that is DarkRP.notify and none of them are popping up in the corner when a player creates a vote, becomes a job, etc. The only file I have modified in the core was from a seperate addon that modifies a chat component, but merely overrides it and I can easily revert it back, I'm modifying it from a different addon file, so that darkrp can update without it breaking or anything and I can just fix it from the external file. But besides that the notifications where not working before I modified that file. I don't see any errors, but if you think it's an addon, please ask me for the list or if you know what might cause it like a setting I might have dumbly disabled but didn't really notice...?

    I donno. Sorry if I seem dumb or something.

    I can give you any file you need, just ask.

    Lol to this day my name right now on this forum makes me cringe a little, I guess if you could remove the AG the brackets and the underscore I'd appreciate it.
    Thanks <3
    --- Double Post Merged, Jun 2, 2016 ---
    Wow as soon as I posted this I think I figured it out. God damnit.
    Anyways, I disabled the hud and that meant that it left the '_Notify' usermessage unhandled and I can't believe I missed that.
    God damnit.
    Well I guess I'll just post this for anyone else to see if they're having this problem.

    Warning: Unhandled usermessage '_Notify'

    Especially if you get this error in your console a bunch that's your problem.
    Just enable the hud or I'll post a module that makes it so you can disable your hud but handle the usermessage.
    I'll post it in a little bit.
    --- Double Post Merged, Jun 2, 2016 ---
    Damnit. Yep that was it.

    Literally just create a folder in darkrpmodification/darkrp_modules and call it notificationfix or something
    then make a file in there called cl_notifications.lua and paste this in there:

    Code (Text):
    local function DisplayNotify(msg)
        local txt = msg:ReadString()
        GAMEMODE:AddNotify(txt, msg:ReadShort(), msg:ReadLong())
        surface.PlaySound("buttons/lightswitch2.wav")

        -- Log to client console
        MsgC(Color(255, 20, 20, 255), "[DarkRP] ", Color(200, 200, 200, 255), txt, "\n")
    end
    usermessage.Hook("_Notify", DisplayNotify)
     
    Restart your server and they should be back.
    Sorry for my idiocy
     
    Last edited: Jun 2, 2016
  2. iVictimize

    iVictimize New Member

    This was an ongoing problem for me, appreciate the hook!
     

Share This Page