General > Developers Corner

How to disable ulx motd from displaying for staff

(1/4) > >>

Storm:
Is there some code I can add to disable the motd from displaying and having to click "ok" for ulx groups (moderator, admin, etc)?

Tarado:
Im sure you can add a "ply.CheckGroup" script to the lua file for the motd.


--- Code: ---Not Tested, just theoretical .

...
local url

function StaffDisplay()
    if ply:CheckGroup("admin") then
        ply:ulx.motd_exists(false)
    elseif ply:CheckGroup("moderator") then
        ply:ulx.motd_exists(false)
    elseif ply:CheckGroup("superadmin") then
        ply:ulx.motd_exists(false)
    end
end


--- End code ---

Storm:
Thanks but this didnt seem to work. Does anyone else have any other ideas?

JamminR:
Comment out gmod/data/ulx/config.txt "motdfile", then make sure your script or server.cfg is setting the motdfile convar to something other than what it used to have for ULX.
If you've not reset it on the server, it's likely the same.


Storm:
Thanks but how does this make it not display for just mods and admins?

Navigation

[0] Message Index

[#] Next page

Go to full version