Disable StarwarsRP job notifications

Is there a way to disable the “User has become XXX job” thats present in the bottom right corner? I didn’t see any options in Darkrp modifications.

Edit: Both Custom /jobs, and normal job switching. :slight_smile:

Thanks in advance if it’s possible

You can change the message in

  • /garrysmod/gamemodes/darkrp/gamemode/modules/language/sh_english.lua*
    Line 132

    job_has_become = "%s has been made a %s!",


to


    job_has_become = "%s has change job!",


You can change the message but you can also disable darkrp’s default hud to remove the notifications. Or remove the messages from it.

I tried to flat out disable default darkrp hud, however that doesn’t solve my issue.

Do you know the location to disable the message(s)?

Search files.
/garrysmod/gamemodes/darkrp/gamemode/modules/base/sv_util.lua



function DarkRP.notify(ply, msgtype, len, msg)
    if not istable(ply) then
        if not IsValid(ply) then
            -- Dedicated server console
            print(msg)
            return
        end

        ply = {ply}
    end

    local rcp = RecipientFilter()
    for k, v in pairs(ply) do
        rcp:AddPlayer(v)
    end

    umsg.Start("_Notify", rcp)
        umsg.String(msg)
        umsg.Short(msgtype)
        umsg.Long(len)
    umsg.End()
end

function DarkRP.notifyAll(msgtype, len, msg)
    umsg.Start("_Notify")
        umsg.String(msg)
        umsg.Short(msgtype)
        umsg.Long(len)
    umsg.End()
end


You all can’t read, this might help…

Solution.

What are even on with, no one is touching core files.

We told him what causes the notification and how they can be disabled

Apologies for sounding like a dip

But would that cause any errors? I know your not supposted to touch Darkrp core files .__.

Let me tell you how you can fix this.

Make a darkrp module.
Make a copy of the cl_hud from the core files in the module. (It will override the core file)
Remove the lines where it creates the notifications (https://github.com/FPtje/DarkRP/blob/b811337f71ba8e130ee5cf3e4bdcd0e6f3f67130/gamemode/modules/hud/cl_hud.lua#L371-L379)
I’d recommend doing that instead of removing/overriding that function.

I made a module with the exact file,(And deleted the selected code) but the notifications still pop up

I placed it under Darkrpmodifications , Should I have made the module in the core darkrp files?

When I get my internet fixed, ill go ahead and send a fix on my github

https://github.com/FFG-Blinkenn/darkrp_nonotifications

[editline]5th February 2017[/editline]

Oh, that didnt automerge, lmao

The only problem is that if you remove the code in the hud file it will remove all notifications, not just job switches. It’s no different from doing
[lua]
function DarkRP.notifyAll() return end
[/lua]

Agreed. Granted it worked, but now the entire hud is gone. xD

No worries though, it was mostly just a “Why not” request