Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Developers Corner / Help me. I need to make one function...
« Last post by Aimatt on October 08, 2019, 07:23:38 AM »
I want to make a jail room, but I have a problem, I want to make sure that when a person is sentenced, the player is given the Banned privilege and after the elapsed time the privilege that was before the punishment was returned.
12
Releases / Re: URS BETA - A Highly Customizeable Restriction System (or will be)
« Last post by DaisyEseyad on October 07, 2019, 07:07:58 PM »
I am trying to get the maximum amount of props/vehicles/etc to show up on a hud so the players know what their limit is. I have done this with flying colors with Unolimited, but the server I am working on uses this more advanced URS addon. The problem is that I am finding this task to be impossible. I cannot find a working way to get these limits as the limits themself are server-side. I tried this xgui method as well but it's got a big issue.

Code: [Select]
if xgui.data.URSLimits.prop then
maxprops = xgui.data.URSLimits.prop[LocalPlayer():GetUserGroup()]||cvars.Number("sbox_maxprops",0)
else

The only time this actually works is when the client user has permission to EDIT the limits, something only ADMINS can do. I hope you can see the problem now. Maybe this has been fixed in a recent version, maybe it really is impossible, maybe i missed something. Can someone help steer me to the right direction? I just want the limit displayed on a hud so people can see.
13
Developers Corner / Re: Help me. I needed a function for checking mut?
« Last post by Timmy on October 04, 2019, 05:47:32 AM »
Assuming you use ULX to perform the muting/gagging.

ULX sets a networked boolean (NWBool) when a player is muted or gagged. You can use this to test if the restriction is active.

Code: Lua
  1. if ply:GetNWBool("ulx_muted") then
  2.   -- ply is muted
  3. else
  4.   -- ply not muted
  5. end

Code: Lua
  1. if ply:GetNWBool("ulx_gagged") then
  2.   -- ply is gagged
  3. else
  4.   -- ply not gagged
  5. end
14
Developers Corner / Help me. I needed a function for checking mut?
« Last post by Aimatt on October 04, 2019, 03:14:45 AM »
Hello! Here I decided to make a short admin menu made functions, but I need to make a button with mute and gag at the same position, for this I need to do:
if <the check function> then
     mute
else
     unmute
end
In the likeness of this.
15
General Chat & Help and Support / Re: Get all users in a group
« Last post by iitiago on October 02, 2019, 08:26:07 AM »
Stickly Man! posted some example code on how to use the data in ULib.ucl.users to get all members of a certain group in Topic: Listing group members.

ULib.getUsers only works on online players. It can be used to get all active players in a certain group. Bytewave posted some examples in Topic: ULib.getUsers help.

UCL - It's a table. It stores all user/group info - (U)lib Access (C)ontrol (L)ist
https://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html

Thank you guys soo much :D

Thanks for the assist Timmy. It was late and i totally forgot .users. Thought there might actually be users in .groups



16
General Chat & Help and Support / Re: Get all users in a group
« Last post by JamminR on October 01, 2019, 08:15:12 PM »
UCL - It's a table. It stores all user/group info - (U)lib Access (C)ontrol (L)ist
https://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html


Thanks for the assist Timmy. It was late and i totally forgot .users. Thought there might actually be users in .groups


17
General Chat & Help and Support / Re: Get all users in a group
« Last post by Timmy on October 01, 2019, 12:45:31 PM »
Stickly Man! posted some example code on how to use the data in ULib.ucl.users to get all members of a certain group in Topic: Listing group members.

ULib.getUsers only works on online players. It can be used to get all active players in a certain group. Bytewave posted some examples in Topic: ULib.getUsers help.
18
General Chat & Help and Support / Re: Get all users in a group
« Last post by iitiago on October 01, 2019, 10:25:54 AM »
Ulib.ucl stores all info. There's a Ulib.ucl.groups that stores other table info, including I think, members.
As for how to use ULib commands, don't forget we have docs.
https://ulyssesmod.net/docs/files/lua/ulib/shared/player-lua.html#getUsers




Ah ok and I read the docs to find getUsers but didnt understand the args required. Ive been looking for the Ulib.ucl.groups in the docs and can't find it. Can you point me in the right direction please?
19
General Chat & Help and Support / Re: Get all users in a group
« Last post by JamminR on September 30, 2019, 07:29:08 PM »
Ulib.ucl stores all info. There's a Ulib.ucl.groups that stores other table info, including I think, members.
As for how to use ULib commands, don't forget we have docs.
https://ulyssesmod.net/docs/files/lua/ulib/shared/player-lua.html#getUsers


20
General Chat & Help and Support / Get all users in a group
« Last post by iitiago on September 30, 2019, 09:55:52 AM »
How would I get all users in a group alongside their steamid? I thought about using getUsers() but have no clue how to use this function.
Pages: 1 [2] 3 4 ... 10