Recent Posts

Pages: 1 [2] 3 4 ... 10
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])



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?)
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")

Thank you for your help!
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.

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

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

I hope this helps. :)
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!
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.
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.
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?
General Chat & Help and Support / Re: I need help with this strand of ulx errors
« Last post by Timmy on December 29, 2020, 08:37:51 AM »
Three possible causes so far. Ordered from most likely to least likely:
  • An addon is breaking the auth hook.
    Fix: remove offending addon.
  • Missing or invalid garrysmod/settings/users.txt file.
    Usually accompanied by this error: lua/includes/extensions/player_auth.lua:66: bad argument #1 to 'KeyValuesToTable' (string expected, got no value)
    Fix: put default users.txt in garrysmod/settings (attached to this post).
  • This weird autorefresh issue.
    Fix: disable autorefresh and/or hibernation.
General Chat & Help and Support / I need help with this strand of ulx errors
« Last post by blue on December 28, 2020, 08:51:51 AM »
[ulib] addons/ulib/lua/ulib/shared/cami_ulib.lua:18: [ULIB] Unauthed player
  1. query - [C]:-1
   2. fn - addons/ulib/lua/ulib/shared/cami_ulib.lua:18
    3. Call - addons/ulib/lua/ulib/shared/hook.lua:109
     4. PlayerHasAccess - gamemodes/darkrp/gamemode/libraries/sh_cami.lua:383
      5. updatePrivs - gamemodes/darkrp/gamemode/modules/doorsystem/cl_doors.lua:8
       6. fn - gamemodes/darkrp/gamemode/modules/doorsystem/cl_doors.lua:14
        7. unknown - addons/ulib/lua/ulib/shared/hook.lua:109

If someone could tell me what would be causing these errors and how to fix them that would be much appreciated. Thank you.
Releases / Re: Give Weapon Addon [1.08v]
« Last post by JamminR on December 22, 2020, 02:15:58 PM »
How do you know? Prove it. We're not taking your word for it unless you tell us errors you get in console (server and client), and what you've tried to troubleshoot.
"it doesn't work" has never been a good start to explaining an issue. It may work for others, just not you. (and, often in development, that is the case after a release of any code). Sure, this release is 7 years old, but I'm not moving it to archives because there's no good evidence indicating it doesn't
Pages: 1 [2] 3 4 ... 10