ULX

Recent Posts

Pages: [1] 2 3 ... 10
1
Releases / Re: Give Weapon Addon [1.08v]
« Last post by PSYCHO on February 26, 2021, 06:47:04 PM »
Thanks brother!
2
Suggestions / Re: Auto-add to usergroup based on kick/banned.
« Last post by MrPresident on January 27, 2021, 08:56:47 AM »
no, that's not how hooks are used. Please find some tutorials on gmod lua hooks and read up on them.
If you still need help, I would suggest joining our discord and asking for help there. Plenty of people there would would be willing to assist you and we check that more than these forums these days.
3
Developers Corner / Re: Allow server console to run admin command
« Last post by MrPresident on January 25, 2021, 07:47:52 AM »
simply check to see if ply is valid

if ply:IsValid() is nil.. then it's the server console.
4
Developers Corner / Allow server console to run admin command
« Last post by Doomed on January 23, 2021, 12:57:52 PM »
Hey guys, im trying to make it so the following console command can be executed from the server console:

Code: [Select]
if (SERVER) then

function Kick( ply, cmd, args )

if !ply:IsUserGroup("moderator") and !ply:IsAdmin() and !ply:IsSuperAdmin() then return false end

local target = findplayer(args[1])
local reason = tostring(args[2])

target:Kick(reason)

end

end
concommand.Add("a_kick", Kick)

Now i made it so it checks to make sure the player is at least a moderator to run the command, but how would i go about making it so the command can be executed from the server console, since there wouldnt be a valid player sending the command in that case. I thought about using IsValid, but would that pose any security risks? (as in, is there a situation where someone could make their player entity invalid in order to run this command?)
5
Suggestions / Re: Auto-add to usergroup based on kick/banned.
« Last post by jut on January 13, 2021, 06:16:33 AM »
Would this work?
Code: [Select]
function ULib.ban( ply )
    if ULib.addBan( ply:SteamID() ) then
      ucl.addUser( ply:SteamID(), "probationary")
    end
end
 

Thank you for your help!
6
Suggestions / Re: Auto-add to usergroup based on kick/banned.
« Last post by MrPresident on January 07, 2021, 08:29:25 AM »
This is not a feature of ULX nor will something like this be added to ULX officially.
We do, however, have hooks in place that would allow you to write this function yourself.

http://ulyssesmod.net/docs/files/lua/ulib/shared/defines-lua.html#ULibPlayerBanned
http://ulyssesmod.net/docs/files/lua/ulib/shared/defines-lua.html#ULibPlayerKicked

The above two links are the hooks you would need to use to detect when a player is kicked or banned.

http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.addUser

The above link is the ULib UCL function you could call to set the player's group.


I hope this helps. :)
7
Suggestions / Auto-add to usergroup based on kick/banned.
« Last post by jut on January 03, 2021, 05:30:09 PM »
So this may be a feature in a mod somewhere, I did search but part of my problem is I am not sure how to properly search to see if it exist.
Basically what I want to know is, is it possible to implement a script that when a staff member kicks / bans a user, that user is then automatically added to a 'probationary' group for misbehaved players.

The reason why I was wondering if there was an automatic feature, is that not all players would have adduser access and this would allow it to be something that would ensure that problematic users are flagged in the ulx system (i.e those in the probationary group are already restricted as to what they CAN and CANNOT do)

Anyways I appreciate your help if you are able to tell me if such a thing does exist or if it is even possible.

P.s Happy new year everyone!
8
Community Servers / Re: Hey Y'all Not Another RP Server
« Last post by jut on January 03, 2021, 05:26:53 PM »
I apologize for missing the gametracker component. We're still alive trying to build a community, gotta say ULX ULIB has not let me down. Its funny there are many admin systems and ULX remains one of the only ones that ages gracefully and does exactly what I want without any stupid bloat.
9
Suggestions / Re: Setting money using SteamID
« Last post by JamminR on December 30, 2020, 10:56:03 PM »
As devs, we avoid commands related to gamemodes in ULX, other than perhaps sandbox.
Though a community member might make a release to do so, or edit a current one, we likely would not ever add a givemoney command to ULX.
10
Suggestions / Setting money using SteamID
« Last post by kazzabong on December 29, 2020, 10:18:48 PM »
Hey, not even entirely sure if this thread is used anymore but I'd like to make a suggestion!

I have looked around and there are plenty of !givemoney commands and such but they require RP Name/Username. Instead can there be a command where you can !givemoneyid so you can enter the persons steam ID and give them money offline or without thread of someone abusing the command and entering A B C as their username?
Pages: [1] 2 3 ... 10