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