Thread: [PI] Help - Easy rep++

Results 1 to 7 of 7
  1. #1 [PI] Help - Easy rep++ 
    Registered Member
    Join Date
    Sep 2010
    Posts
    51
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Everyone can join my clan chat but they cant use the "/" to talk to each other whats wrong? In commands.java or w/e im using this:
    @Override
    public void processPacket(Client c, int packetType, int packetSize) {
    String playerCommand = c.getInStream().readString();
    if(Config.SERVER_DEBUG)
    //Misc.println(c.playerName+" playerCommand: "+playerCommand);
    if (playerCommand.startsWith("/") && playerCommand.length() > 1) {
    if (c.clanId >= 0) {
    //System.out.println(playerCommand);
    playerCommand = playerCommand.substring(1);
    Server.clanChat.playerMessageToClan(c.playerId, playerCommand, c.clanId);
    } else {
    if (c.clanId != -1)
    c.clanId = -1;
    c.sendMessage("You are not in a clan.");
    }
    return;
    }
    Why isn't it working? Will rep++

    Maybe is because in my config my server debug is false?
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Mar 2010
    Age
    29
    Posts
    686
    Thanks given
    35
    Thanks received
    92
    Rep Power
    157
    Code:
    if (playerCommand.startsWith("/")
    Means they would have to type in ::/<MESSAGE>

    I believe the slash is added as an input String in the client.
    [code]
    Reply With Quote  
     

  3. #3  
    Registered Member Mayday Parade's Avatar
    Join Date
    Apr 2009
    Age
    27
    Posts
    495
    Thanks given
    20
    Thanks received
    17
    Rep Power
    8
    Quote Originally Posted by I Vain I View Post
    Code:
    if (playerCommand.startsWith("/")
    Means they would have to type in ::/<MESSAGE>

    I believe the slash is added as an input String in the client.
    [code]
    You're right on the money It would be in your client files. Can't remember where exactly, i just remember it being in the client.java. It may be in the server files, but i am pretty sure i remember seeing them in the client folder.

    Oh, I Vain I, welcome to R-S, you are pretty popular on Mopar. Good luck keeping up with the pro's.

    Spoiler for LoL:
    Quote Originally Posted by Imbued View Post
    Quote Originally Posted by pasta186 View Post
    That tutorial doesnt walk.
    That's because it got no legs..
    Best report I've sent? "Mass spam? Also in wrong sexual"
    LOL
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Mar 2010
    Age
    29
    Posts
    686
    Thanks given
    35
    Thanks received
    92
    Rep Power
    157
    I've been here for a while.
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Feb 2008
    Posts
    384
    Thanks given
    30
    Thanks received
    26
    Rep Power
    0
    or you could leave the client alone and edit your chat stuff serverside...
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Mar 2010
    Age
    29
    Posts
    686
    Thanks given
    35
    Thanks received
    92
    Rep Power
    157
    Quote Originally Posted by billygotshot View Post
    or you could leave the client alone and edit your chat stuff serverside...
    Or he could do it the correct way, and add the inputString back to the client?
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Sep 2010
    Posts
    51
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    How about you stop being clever and actually help me out and tell me what to do because you're posts arent helping!!!
    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

Similar Threads

  1. Replies: 0
    Last Post: 03-25-2010, 11:01 PM
  2. Replies: 5
    Last Post: 11-09-2009, 06:36 PM
  3. [EASY] changing welcome to (servername) [EASY]
    By Rapidz in forum Tutorials
    Replies: 21
    Last Post: 08-24-2009, 12:07 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •