Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MrPresident

Pages: [1] 2 3 ... 143
1
Developers Corner / Re: Help With HUDDrawTargetID?
« on: January 13, 2017, 05:33:06 PM »
It's not that hard. That's why I suggested you look at how it's currently done for how they do it.

3
Off-Topic / Re: Make Persistent freezing server
« on: January 13, 2017, 12:12:55 AM »
Hi, ulx doesn't do this at all.
We don't handle props in any fashion. If you are getting saves every 10 minutes, something other than ULX is causing it.

Moving this to Off Topic.

4
Developers Corner / Re: Help With HUDDrawTargetID?
« on: January 12, 2017, 08:55:46 PM »
Take a look at

garrysmod/gamemodes/base/gamemode/cl_targetid.lua

This is how garrysmod handles HUDDrawTargetID()

You don't need to mix it with HUDPaint, it's just saying that it's called from within HUDPaint. you essentially just draw elements in that function.

It is entirely clientside, so any information about a player you want to draw will need to be networked or saved to NWVars.

5
This is true, and in fact, autopromote WILL cause issues with your server and ULX down the road if you use it due to how it works and some limitations of ULX. Use at your own risk. :)

7
instead of demoting them, why don't you just revoke the permissions they are abusing?

Say billy gets !gag as Senior Member and they are abusing it..

ulx userdeny billy "ulx gag"
ulx userdeny billy "ulx ungag"

This will deny that single user's permission without affecting the rest of the people in Senior Member, also they get to stay the rank they 'earned'

9
Off-Topic / Re: Learning Python
« on: January 09, 2017, 12:21:48 PM »
I also agree with the above. PHP is nice and most serverside web applications use it. Python is nice, but it's not as widely used.

PHP is pretty powerful as well, you can do quite a bit with it.

10
Developers Corner / Re: Message Printing Twice
« on: January 07, 2017, 09:39:11 AM »
This would work. I'm storing the group to a local string var before the check, and I'm only indexing the UCL table if it exists.

Code: Lua
  1. if SERVER then
  2.    gameevent.Listen( 'player_disconnect' )
  3.    hook.Add( "player_disconnect", "Announce Leaves", function( data )
  4.       local name = data.name
  5.       local sid = data.networkid
  6.       local bot = data.bot
  7.       local reason = data.reason
  8.       local group = "user"
  9.          
  10.       if ULib.ucl.getUserInfoFromID( sid ) then
  11.          group = ULib.ucl.getUserInfoFromID( sid ).group
  12.       end
  13.  
  14.  
  15.       if group == "superadmin" then
  16.          ULib.tsayColor( _, "", white, "[", announce, "VG Disconnect", white, "] [OWNER] ", name_col, name, white, " {", red, sid, white, "} has left the Server. Reason: " .. reason )
  17.       else
  18.          ULib.tsayColor( _, "", white, "[", announce, "VG Disconnect", white, "] ", name_col, name, white, " {", red, sid, white, "} has left the Server. Reason: " .. reason )
  19.       end
  20.    end )
  21. end
  22.  

11
Developers Corner / Re: Message Printing Twice
« on: January 07, 2017, 09:33:32 AM »
That's correct.

Ucl only registers players who have been given access. All other players fall back into the user group, but it doesn't store them in the table.

Could you imagine how massive the access table would get if every player was added to it?

12
Developers Corner / Re: Message Printing Twice
« on: January 07, 2017, 12:18:02 AM »
Oh.. you might want to make sure that they are in UCL..

ULib.ucl.getUserInfoFromID( sid ) will be nil if there isn't any info for that steamid, so you can't index it.

13
Developers Corner / Re: Message Printing Twice
« on: January 07, 2017, 12:15:57 AM »
What is line 24? That error message doesn't help anyone when you only provide a snip of the code.

14
Developers Corner / Re: Message Printing Twice
« on: January 04, 2017, 11:41:24 AM »
I figured, since you were using tapatalk. I just want to make sure you are able to get the info you need. :)

Let me know if you need further assistance.

15
Developers Corner / Re: Message Printing Twice
« on: January 04, 2017, 11:37:51 AM »


The keys are

.name
.group


so to get the group of someone by the steamid, you would simply do:

ULib.ucl.getUserInfoFromID( steamid ).group


Sorry it's so convoluted, it's something we use internally, but it's there if you need it.

It'll also return .allow and .deny which are tables of commands that you have allowed or denied to that player specifically. (not including allows and denys that are in their group)

Pages: [1] 2 3 ... 143