View Single Post
  #11  
Old 06-30-2011, 10:37 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by xuntasi View Post
Thanks very much! Just to clarify, it's putting ("/setname ".length()) after player.chat.substring that causes the "/setname" part of the players chat to not effect the whole name? If you don't have time to explain, I understand, I know I'm being an endless font of questions right now, but how exactly does that work? It'd be good to know for future scripts.
I updated my code to clear it up.

Basically the length of "/setname " is the position in the string where the player's input starts. I.e:

/setname test

would return: test

You can also trim your input as well but I wouldn't worry about that right now.
__________________
Quote:
Reply With Quote