[Trigger] -setname command

Status
Not open for further replies.
changing player name

That can be easily done.

<<< EDIT >>>

Here you are:

Variables:

  • Command (String)
  • CommandLength (Integer)
  • NewName (String)

Triggers:

  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- If you ever need to change the command which changes the name you can change the following variable only. --------
      • Set Command = -setname
      • -------- -------- --------
      • Set CommandLength = ((Length of Command) + 2)
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to Change Name <gen> the event (Player - (Player((Integer A))) types a chat message containing Command as A substring)
  • Change Name
    • Events
    • Conditions
    • Actions
      • Set NewName = (Substring((Entered chat string), CommandLength, (Length of (Entered chat string))))
      • Game - Display to (All players) for 30.00 seconds the text: ((Name of (Triggering player)) + ( has changed his name to + NewName))
      • Player - Set name of (Triggering player) to NewName
      • Set NewName = <Empty String>
 
Last edited:
Another method that you could use is part of my vJass Chat System, if say you do not want player's name to actually change. The system also allows you to use custom colors, and various other features, all of which can be changed via the constant booleans. I'm planning on redoing the system so that you can just import the main library, create your own initialization trigger that runs specific sections of the library, but I've been busy lately. I'll be sure to work on it though.
 
Status
Not open for further replies.
Back
Top