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

How can i get on $args[] a nickname with space?

Discussion in 'Help' started by LewBr, Jan 3, 2018.

  1. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    Hello, recently minecraft bedrock got support for xbox live and this is not so bad, right? Now for that reason there are players with nickname with space in the middle as well.

    So, there is some method of writing the nick by putting something like this on a command?:
    /punish (cool _jeb) hack evidences

    Like type putting in args type a barrier on chat like [] or () and identify the nick inside it, has it like this? Or is there any other method to do this?
     
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    Put the name between " "
    /command "player name"
     
  3. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    So how can i do to this in my code? To identify the player inside the " " ?
     
  4. xZeroMCPE

    xZeroMCPE Witch

    Messages:
    67
    GitHub:
    xZeroMCPE
    You can use implode, for example:

    So a usage would be:

    Code:
    $bah = implode(" ", $args);
     
  5. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    SleepSpace9 and HimbeersaftLP like this.
  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.