Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
It only says "You" to you. It would say your username to everyone else.
22
I have changed the echos and it still just says you is now (command) when it is supposed to say Milky is now (command)

I have searched everything and couldn't find anything relating to my issue, please help i'm dying.

Thanks!
23
General Chat & Help and Support / Re: Having problems with ULX
« Last post by -l-999-l- on June 09, 2019, 04:43:51 AM »
So how should I do to fix ym singleplayer, because I can't use physgun. I yhink it's because I'm not considered as a superadmin.
25
Developers Corner / Toggle between !admin and !unadmin
« Last post by TheMilkMan on June 08, 2019, 06:12:41 PM »
1. Toggle for !admin to also do !unadmin when pressing it again
Also How do I restrict admin powers unless you're in admin mode

Current Code for this:
Code: [Select]
function ulx.admin( calling_ply, should_revoke )

if not should_revoke then
calling_ply:GodEnable()
else
calling_ply:GodDisable()
end

if not should_revoke then
calling_ply:SetModel( "models/player/combine_super_soldier.mdl" )
end

if not should_revoke then
ulx.fancyLogAdmin( calling_ply, true, "#A is now administrating" )
end
end
local admin = ulx.command( "Admin", "ulx admin", ulx.admin, { "!admin", "!admin"}, true )
admin:addParam{ type=ULib.cmds.BoolArg, invisible=true }
admin:defaultAccess( ULib.ACCESS_SUPERADMIN )
admin:help( "Noclip, & God Mode yourself" )
admin:setOpposite( "ulx unadmin", { _, true }, "!unadmin", true )


function ulx.unadmin( calling_ply, should_revoke )
if not should_revoke then
ulx.fancyLogAdmin( calling_ply, true, "#A has stopped administrating" )
end

if not should_revoke then
local jobTable = calling_ply:getJobTable()

    if not jobTable then return self.Sandbox.PlayerSetModel(ply) end

    if jobTable.PlayerSetModel then
        local model = jobTable.PlayerSetModel(ply)
        if model then ply:SetModel(model) return end
    end

    local EndModel = ""
    if GAMEMODE.Config.enforceplayermodel then
        if istable(jobTable.model) then
            local ChosenModel = string.lower(calling_ply:getPreferredModel(calling_ply:Team()) or "")

            local found
            for _, Models in pairs(jobTable.model) do
                if ChosenModel == string.lower(Models) then
                    EndModel = Models
                    found = true
                    break
                end
            end

            if not found then
                EndModel = jobTable.model[math.random(#jobTable.model)]
            end
        else
            EndModel = jobTable.model
        end

        calling_ply:SetModel(EndModel)
    else
        local cl_playermodel = ply:GetInfo("cl_playermodel")
        local modelname = player_manager.TranslatePlayerModel(cl_playermodel)
        calling_ply:SetModel(calling_ply:getPreferredModel(calling_ply:Team()) or modelname)
    end

    calling_ply.darkrp.PlayerSetModel( ply )

    calling_ply:SetupHands()
end
end
local admin = ulx.command( "Unadmin", "ulx unadmin", ulx.unadmin, { "!unadmin", "!unadmin"}, true)
unadmin:addParam{ type=ULib.cmds.BoolArg, invisible=true }
unadmin:defaultAccess( ULib.ACCESS_SUPERADMIN )
unadmin:help( "Noclip, & God Mode yourself" )
unadmin:setOpposite( "ulx admin", { _, true }, "!admin", true )
26
Several ways to do it, but this answers your exact question.
https://forum.facepunch.com/gmoddev/nnmh/Simple-way-to-play-sounds-to-all-players/1/#postepyyq

We use a server ULib umsg to send a sound command with the path, client receives the path and plays it.
27
Please answer
28
Developers Corner / Re: GetGroupstable for DListView
« Last post by doc_brown on June 04, 2019, 06:13:33 PM »
Thanks for the quick response time!
worked amazingly.
 8)
29
Developers Corner / Re: GetGroupstable for DListView
« Last post by Megiddo on June 04, 2019, 05:50:50 PM »
It's not in the documentation because we don't want anyone messing with it directly, but for your use case of simply getting a list of groups, you can access
Code: [Select]
ULib.ucl.groups
30
Developers Corner / GetGroupstable for DListView
« Last post by doc_brown on June 04, 2019, 05:12:37 PM »
I'm trying to display all the ranks of ulx
in a Dlistview with a simple for k,v loop

I have tried to look at the util.GetUserGroups() table,
but this table only has values pertaining to people already with
a usergroup.
I was wondering if ULX has something like this built in I would be able to use,
or if I would have to access the groups from the data folder.

thanks in advance!
Pages: 1 2 [3] 4 5 ... 10