ID:178334
May 26 2002, 1:32 pm
|
|
I'd like to know if it's possible to limit the amount of characters that a player can input. For example, limit a player to 24 characters for their name, 128 characters when chatting, etc. Probably is, I just haven't seen a thread explaining how to, and never found it in DM's help index.
|
May 26 2002, 2:15 pm
|
|
Yes it is. All you have to do is download Deadrons Character handling library and read ovver it and the demo and you will learn.
|
Matic293 wrote:
I'd like to know if it's possible to limit the amount of characters that a player can input. For example, limit a player to 24 characters for their name, 128 characters when chatting, etc. You bet there is! There's two methods of doing this: 1) You can make them choose another name if their name is over 24 characters. (using length()) mob/Login() 2) You can take the first 24 characters of the name, and risk their name being cut off. (using copytext()) mob/Login() Personally, I prefer #1, but you can use #2 if you want :) Your question about limitting chat messages to 128 characters is accomplished with copytext(). All you'd do is make <font face=system>msg = copytext(msg,1,129)</font> to make the message only include the first 128 characters :) =V |
In response to Vortezz
|
|
Thanks for your help! So it sounds like DM skipped the abililty to stop the input cursor after a certain amount of characters? That is more to what I was hoping for, but as long as there isn't another player named "Antidisestablishmentarianist", I'll be a happy camper. =,
|