ULX

Author Topic: Display Name  (Read 1785 times)

0 Members and 1 Guest are viewing this topic.

Offline Zmaster

  • Full Member
  • ***
  • Posts: 235
  • Karma: 25
Display Name
« on: July 04, 2014, 07:24:53 PM »
Hey, again :P

I currently am using an undercover command that I got off these forums (thanks for that), but I want to add something on to it, and I'm not sure how I would do that.

Here's the code for the command so far
Code: [Select]
// Undercover Command

function ulx.undercover( calling_ply )
 
if calling_ply:IsUserGroup("owner") then
calling_ply:SetUserGroup("ucowner")
 
elseif calling_ply:IsUserGroup("ucowner") then
calling_ply:SetUserGroup("owner")
end
 
ulx.fancyLogAdmin( calling_ply, true, "#A went undercover" )
end

local undercover = ulx.command( CATEGORY_NAME, "ulx undercover", ulx.undercover, "!uc", true )
undercover:defaultAccess( ULib.ACCESS_ADMIN )
undercover:help( "Makes Owner undercover (no Owner tag)" )

// Undercover Command

I want to make it so it not only changes my rank, but it also changes the username it displays when I type a message and in the tab list.

This might be harder than it sounds to me, but I'm not sure.

Anyone know what to do?

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: Display Name
« Reply #1 on: July 04, 2014, 07:29:35 PM »
Technically, that isn't possible. This is because Garry's Mod takes the names from your Steam profile.
There are some gamemodes that override this by implementing their own name displays, such as DarkRP (I think).

What gamemode are you running?
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Zmaster

  • Full Member
  • ***
  • Posts: 235
  • Karma: 25
Re: Display Name
« Reply #2 on: July 04, 2014, 07:59:28 PM »
Technically, that isn't possible. This is because Garry's Mod takes the names from your Steam profile.
There are some gamemodes that override this by implementing their own name displays, such as DarkRP (I think).

What gamemode are you running?

TTT