Setting ply:Nick

How can I set the value of


ply:Nick()

, I don’t want it to return my steam alias, I want it to set as some other string, how can I do so?

Is this even possible?

[lua]_R.Player.OldNick = _R.Player.Nick

function _R.Player:Nick()
return _R.Player:OldNick()…" is awesome"
end

_R.Player.Name = _R.Player.Nick
_R.Player.GetName = _R.Player.Nick[/lua]

Then when I call the function do I call it with


ply:Nick()

still or do I call it with


_R.ply:Nick()

No, that’s just a saved copy of the old player:Nick function. So as you can use the old version rather than your new one (Which I did in the example)

You call Nick just as you normally would.

[editline]06:44PM[/editline]

ninja :ninja:

Ah excellent, thank you both.

[lua]
local r = _R.Player:Nick()
function _R.Player:Nick()
return self:GetPData( “Nick” ) or r
end
[/lua]

Will return nil or “unconnected”.

What if I did
[lua]
function _R.Player:Nick()
return ply:RpName()
end
[/lua]

Would that work?, I have set the ply:RpName() meta as a string.

Replace ply with self.

That’s what I thought.