ULX

Author Topic: Fakename - Go Undercover!  (Read 25310 times)

0 Members and 1 Guest are viewing this topic.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Fakename - Go Undercover!
« Reply #15 on: June 07, 2015, 11:56:08 AM »
With help from Zoeo pointing out a couple of things in an example, I just posted a download for a file that will fix TTT name changes.  Just see first post, it is self explanatory.

I also pushed a small change to fakename.  I guess I was removing networked variables the wrong way.  It seems like I can never get it just right or it keeps changing.  No idea.

Offline Zoeo

  • Newbie
  • *
  • Posts: 15
  • Karma: 1
Re: Fakename - Go Undercover!
« Reply #16 on: June 09, 2015, 01:18:03 PM »
I found a way to change the entity:GetUserGroup(), but by doing so it changes how the ULib and ULX see your rank meaning you cannot use any commands.
Code: [Select]
function meta:GetUserGroup()
local realgroup = self:GetNetworkedString( "UserGroup", "user" )
local fakegroup = self:GetNWString( "FakeGroup", "user" )
if not self:IsFakenamed() then
return realgroup
else
return fakegroup
end
end

As I said though, when the ULX and ULib look at this it thinks that it is your actual rank and not a fake one, so any powers you have are unusable while hidden.  I tried to overwrite a ULib function in order to look at it as your real group instead of as a fakegroup, but I can't seem to get it to work.

NOTE: I should note that the rank MUST exist with this method, attempting to use a rank that is not on the server will cause errors and the ULiband ULX will break/lock you out until you change map/reset server and set your rank back.

As for the issue with the networked varibles, the NWVars were updated in the latest big update so I knew something was going to be up with them.  Setting it as nil instead of false also works.
« Last Edit: June 09, 2015, 01:26:47 PM by Zoeo »

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Fakename - Go Undercover!
« Reply #17 on: June 10, 2015, 02:28:54 PM »
I found a way to change the entity:GetUserGroup(), but by doing so it changes how the ULib and ULX see your rank meaning you cannot use any commands.
Code: [Select]
function meta:GetUserGroup()
local realgroup = self:GetNetworkedString( "UserGroup", "user" )
local fakegroup = self:GetNWString( "FakeGroup", "user" )
if not self:IsFakenamed() then
return realgroup
else
return fakegroup
end
end

As I said though, when the ULX and ULib look at this it thinks that it is your actual rank and not a fake one, so any powers you have are unusable while hidden.  I tried to overwrite a ULib function in order to look at it as your real group instead of as a fakegroup, but I can't seem to get it to work.

NOTE: I should note that the rank MUST exist with this method, attempting to use a rank that is not on the server will cause errors and the ULiband ULX will break/lock you out until you change map/reset server and set your rank back.
Issues I all ran into.  This is why I am leaving it to server owners to incorporate it into their servers.

Offline captainz

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Fakename - Go Undercover!
« Reply #18 on: June 10, 2015, 07:57:54 PM »
Doesn't work with Darkrp though!  :( :(

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Fakename - Go Undercover!
« Reply #19 on: June 10, 2015, 09:24:39 PM »
Doesn't work with Darkrp though!  :( :(
I never tested it, I would have to check it out later.

Offline captainz

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Fakename - Go Undercover!
« Reply #20 on: June 16, 2015, 07:00:08 PM »
Have you tested it yet?

Offline Zoeo

  • Newbie
  • *
  • Posts: 15
  • Karma: 1
Re: Fakename - Go Undercover!
« Reply #21 on: June 17, 2015, 09:49:20 AM »
Here is a fix for the player not showing up as the rank they're supposed to show up as in the ULX playerarg list and in the "ulx who" command

WARNING: These files will overwrite the commands.lua and util.lua within the ULX, if you are using a modified version of commands.lua/util.lua or an updated ULX and ULib that has changed the commands.lua/util.lua in some way, those modifications will no longer exist and could break your ULX/ULib.  This version is made for ULib version 2.52 ULX version 3.62. USE AT YOUR OWN RISK

Put the commands.lua in fakename/lua/ulx/xgui/

Put the util.lua in fakename/lua/ulx/modules/sh/

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Fakename - Go Undercover!
« Reply #22 on: June 17, 2015, 10:42:01 AM »
Doesn't work with Darkrp though!  :( :(
Have you tested it yet?

Fixed 154058ca54.  I assume DarkRP overwrites the name functions as well (to add nicknames or something like that).  I simply added more things to hopefully ensure we are the last to overwrite anything.
« Last Edit: June 17, 2015, 10:51:42 AM by Aaron113 »

Offline Ryan Hemmet

  • Newbie
  • *
  • Posts: 20
  • Karma: 8
    • https://adversarygaming.com
Re: Fakename - Go Undercover!
« Reply #23 on: August 06, 2015, 10:37:45 AM »
I wonder if it would be suspicious to go undercover as Nyan Yemmet.. hmmmm....

Anyways, I love this because otherwise I need to change my name on steam, change my group, etc.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Fakename - Go Undercover!
« Reply #24 on: August 06, 2015, 10:44:03 AM »
I wonder if it would be suspicious to go undercover as Nyan Yemmet.. hmmmm....

Anyways, I love this because otherwise I need to change my name on steam, change my group, etc.
Not at all!  This is indeed one of my favorites from a server I used to admin on a long time ago.  Simply recreated for ULX.

Offline jakobg223

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Fakename - Go Undercover!
« Reply #25 on: June 17, 2017, 10:40:24 AM »
I know basically nothing about lua and all that , so could someone give me some sort of idea on how to make this compatible with ttt easyscoreboardranks?
« Last Edit: June 17, 2017, 11:03:42 AM by jakobg223 »