Thread: Making players say something you want them to say.

Results 1 to 5 of 5
  1. #1 Making players say something you want them to say. 
    Oxygen
    Guest
    How would I make a command that makes a player say what you want them to say? I looked for a guide but I couldn't find one.
    Pl0x.
    Lol.
    Rep+ to who helps.
    Reply With Quote  
     

  2. #2  
    haloking
    Guest
    I can help, what server source are you using?
    Reply With Quote  
     

  3. #3  
    Oxygen
    Guest
    Well I got so far:
    Code:
    if (command.startsWith("maketalk")){
    try {
    String Tlk = command.substring(4);
    int TlkID = PlayerHandler.getPlayerID(Tlk);
    client p = (client) server.playerHandler.players[TlkID];
    p.plrText = ""+command.substring(???)+"";
    p.plrTextUpdateRequired = true;
    }catch(Exception e) {
    sendMessage("Wrong syntax! Use as ::maketalk [PLAYERNAME].");
    }
    }
    Trying to make it so you do
    Code:
    ::maketalk [playername] [whatyouwantthemtosay]


    ---------- Post added at 04:24 AM ---------- Previous post was at 04:03 AM ----------

    Anyone know? D:
    Reply With Quote  
     

  4. #4  
     

    Vastiko's Avatar
    Join Date
    Dec 2006
    Posts
    5,700
    Thanks given
    300
    Thanks received
    663
    Rep Power
    5000
    okay use this:
    String[] parts = command.split(" ");
    int playerId = Integer.valueOf(parts[1]);
    ...Do the rest here...
    p.plrText = parts[1];
    p.plrTextUpdateRequired = true;

    Reply With Quote  
     

  5. #5  
    Oxygen
    Guest
    I don't understand .-.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •