Ulysses

Ulysses Stuff => Suggestions => Topic started by: Saucey on July 10, 2014, 10:46:08 AM

Title: ULX Nickname
Post by: Saucey on July 10, 2014, 10:46:08 AM
I have had a couple people try to set up a command for me and it just doesn't seem to work.  I have been itching for a nickname system to be implemented on my servers. For instance, I want to be able to nickname myself when I am on my own servers to whatever I please.

example:

My name is "Hej" I could type !nickname Hej "server owner"

My name would now be "server owner" although my steam name would still be Hej.

I would like to see if this can be done and put into a ulx command.
Title: Re: ULX Nickname
Post by: Cobalt on July 10, 2014, 05:19:36 PM
You can do something like this, assuming most addons use Name and Nick instead of GetName

Code: [Select]
local _ply = FindMetaTable( "Player" )

function _ply:OldName()
return self:GetName()
end

function _ply:Name()
if self:GetNWString( "alt_name" ) ~= "" then
return self:GetNWString( "alt_name" )
else
return self:OldName()
end
end

function _ply:Nick()
if self:GetNWString( "alt_name" ) ~= "" then
return self:GetNWString( "alt_name" )
else
return self:OldName()
end
end

Title: Re: ULX Nickname
Post by: LuaTenshi on July 11, 2014, 08:42:35 AM
Here is one that is a bit more advanced, all credits go to CapsAdmin... https://github.com/CapsAdmin/fast_addons/blob/master/lua/fast_addons/playernick.lua (May need some editing to work the way you want it to.)
Title: Re: ULX Nickname
Post by: Saucey on July 18, 2014, 02:15:12 AM
Okay thanks for the help, I will try and see what I can do.
Title: Re: ULX Nickname
Post by: Saucey on September 05, 2014, 03:24:39 AM
Ended up just paying a coder to do it for me, took more time than expected to get this to work. I also got a ULX title command as well.