1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Custom Name

Discussion in 'Development' started by CocoonBuilder, Oct 12, 2018.

  1. CocoonBuilder

    CocoonBuilder Spider Jockey

    Messages:
    43
    GitHub:
    chimneychuckles
    So when i add this code

    $item->setCustomName(TF::RESET . TF::BOLD . TF::GOLD . "Note");

    when i give myself the item that i add custom name to it the item didnt get rename but when i use it for example i use one xp bottle from stack the item change from default to custom name. XP Bottle -> Note

    is there a way to make the item get custom name without using the item in order to get custom name
     
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    After setting the item's name are you resending the inventory to the client?
     
    Muqsit likes this.
  3. CocoonBuilder

    CocoonBuilder Spider Jockey

    Messages:
    43
    GitHub:
    chimneychuckles
    i think
     
  4. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Send your full code
     
  5. CocoonBuilder

    CocoonBuilder Spider Jockey

    Messages:
    43
    GitHub:
    chimneychuckles
    could i do it via discord since i have ur discord and it will be easier/better to communicate?
     
  6. CupidonSauce173

    CupidonSauce173 Zombie

    Messages:
    298
    GitHub:
    cupidonsauce173
    I have the exact same question for the items.
     
  7. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    If that's how you're going to conclude your future posts too, then you shouldn't be writing a thread to begin with.
    This is a forum. The future visitors are going to judge this thread by the title expecting to get help and wouldn't like to see the thread get solved in a private discussion.
     
  8. CupidonSauce173

    CupidonSauce173 Zombie

    Messages:
    298
    GitHub:
    cupidonsauce173
    Just happened for me x). But is there a solution for his question ?
     
  9. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Have you tried resending the item like @jasonwynn10 said (set the item in player's inventory after modifying it)?
     
    OnTheVerge likes this.
  10. CupidonSauce173

    CupidonSauce173 Zombie

    Messages:
    298
    GitHub:
    cupidonsauce173
    yes ofc, this is what I do but I mean, how to register the item directly.
     
  11. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    You can't directly do that. Items are isolated from clients.
    Item instances have no idea who is holding them or are able to see them. There's no other way than to set the item back in the right slot and right inventory once you modify it.
     
  12. CupidonSauce173

    CupidonSauce173 Zombie

    Messages:
    298
    GitHub:
    cupidonsauce173
    So there is no way to say 145:500 is a registered item ?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.