1. #1

    Details! - Custom Text

    I'm having an issue with Details Custom Text. I'm trying to return the player name that belongs in the slot of the window I'm editing the text for, but I can't work out how to do it. I know I can use {data2}, but I want to truncate the name, which I can't seem to do using {data2}.

    I've worked out how to truncate using LUA, but can't work out how to return the name using the Custom Text field. If I could see the source code of how {data2} is pre-defined, I'm sure I could probably work it out, but I've looked through every file in the Details addon folder and can't find where it's defined.

    Does anyone know how to call the player name for the Custom Text field?

    Pretend {data2} doesn't exist, how would you use the {func} command to call the name of the player?

  2. #2
    Quote Originally Posted by theory88 View Post
    I'm having an issue with Details Custom Text. I'm trying to return the player name that belongs in the slot of the window I'm editing the text for, but I can't work out how to do it. I know I can use {data2}, but I want to truncate the name, which I can't seem to do using {data2}.

    I've worked out how to truncate using LUA, but can't work out how to return the name using the Custom Text field. If I could see the source code of how {data2} is pre-defined, I'm sure I could probably work it out, but I've looked through every file in the Details addon folder and can't find where it's defined.

    Does anyone know how to call the player name for the Custom Text field?

    Pretend {data2} doesn't exist, how would you use the {func} command to call the name of the player?
    Here is the solution:
    {func local player = ... return string.sub(player:name(), 1, 5)}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •