Thread: [pi] Custom yells based on name.

Results 1 to 4 of 4
  1. #1 [pi] Custom yells based on name. 
    Registered Member
    Join Date
    Nov 2011
    Posts
    12
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Ok hello everyone it's NewCoder ,
    im doing small lesson about "how to give someone custom yell based on name"

    here you go:

    ok first go "server file(source)>src>server>model>packets>players>comm ands.java"

    Search for yell command by typing this:
    Code:
    if (playerCommand.startsWith("yell")) {
    Then,You will see stuff like this:
    Code:
    if (c.isDonator == 1 && (c.playerRights < 1 || c.playerRights > 3)){
                                                                    c2.sendMessage("<shad=6081134>[Donator]</col><img=0>"+ Misc.optimizeText(c.playerName) +": "
                                                                                                    + Misc.optimizeText(playerCommand.substring(5)) +"");
                                                            }else if (c.playerName.equalsIgnoreCase("NewCoder")) {
                                                                    c2.sendMessage("<col=255>[example of custom]</col><img=2>"+ Misc.optimizeText(c.playerName) +": "
                                                                                                    + Misc.optimizeText(playerCommand.substring(5)) +"");

    and go on the top of that on this one:
    Code:
    if (c.isDonator == 1 && (c.playerRights < 1 || c.playerRights > 3)){
                                                                    c2.sendMessage("<shad=6081134>[Donator]</col><img=0>"+ Misc.optimizeText(c.playerName) +": "
                                                                                                    + Misc.optimizeText(playerCommand.substring(5)) +"");
    Under that start making them by doing this:

    Code:
    }else if (c.playerName.equalsIgnoreCase("NewCoder")) {
                                                                    c2.sendMessage("<col=255>[example of custom]</col><img=2>"+ Misc.optimizeText(c.playerName) +": "
                                                                                                    + Misc.optimizeText(playerCommand.substring(5)) +"");
    you can now change "newcoder" to the username and "example of custom" to the massege you want to appear.

    ~thanks,newcoder.

    And feel free to ask anything Btw,this thread was by me so if anything wrong pm me please or comment it down
    Reply With Quote  
     

  2. #2  
    q.q


    Join Date
    Dec 2010
    Posts
    6,535
    Thanks given
    1,072
    Thanks received
    3,534
    Rep Power
    4752
    been released many many times l:
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Nov 2011
    Posts
    12
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Didn't knew , I'm just new
    Reply With Quote  
     

  5. #4  
    Fuck the rest join the best, WoR
    Jinx's Avatar
    Join Date
    Oct 2010
    Posts
    635
    Thanks given
    99
    Thanks received
    65
    Rep Power
    364
    100% common sense; anyone who knows how to code can do this. Props to you for making an effort to help the community though =).
    The wor has begun.


    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. Custom Staff + Post Based Ranks.
    By DXCory in forum Showcase
    Replies: 6
    Last Post: 07-09-2011, 12:01 PM
  2. Replies: 5
    Last Post: 12-28-2010, 03:29 PM
  3. Replies: 7
    Last Post: 08-21-2010, 03:47 PM
  4. Replies: 6
    Last Post: 12-05-2009, 01:41 AM
  5. Yells whenever you mute someone
    By Ragez Fury in forum Tutorials
    Replies: 8
    Last Post: 01-23-2009, 05:33 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
  •