Okay so I don't really know if this will get taken down because I feel like it's more on the request side than asking.
How do I do name shortening like the one the admins use like .kill bui and kills Builderman
Okay so I don't really know if this will get taken down because I feel like it's more on the request side than asking.
How do I do name shortening like the one the admins use like .kill bui and kills Builderman
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
This can range from a simple, to unusually complex task depending on how you perceive the best approach in this scenario—as there are multiple different ways to go about it. Personally, if I am trying to piece up a ChatMessage, I'd use the :split() separation method of the String class for singular analysis; I usually use the :gsub() method in conjunction with this to isolate, E.g from prefixes.
The final product will result in an array, which makes the individual evaluation a much smoother process. Here, you can use the textual attributes to locate a matching command handle, and a following "argument"—this of which is our shortened username. To pinpoint a Player with a severed reference, you can easily iterate through all players, and match their username to the fragment.