PDA

View Full Version : [PI] Simple Command



317 Delta Coder
September 10th, 2011, 16:29
Difficulty: 1/10
Revision: 317

Step 1:
Open (your Source)/src/server/models/players/packets/commands.java
Search for (include the "'s): "players"
Under that Command add:

if (playerCommand.startsWith("myrank")) {
if (c.playerRights == 0 && c.isDonator == 0) {
sendMessage("You are Currently Ranked as an: <col=255>Player</col>.");
} else if (c.playerRights == 0 && c.isDonator == 1) {
sendMessage("You are Currently Ranked as an: <col=255>Donator</col>.");
} else if (c.playerRights == 1) {
sendMessage("You are Currently Ranked as an: <col=255>Moderator</col>.");
} else if (c.playerRights == 2) {
sendMessage("You are Currently Ranked as an: <col=255>Administrator</col>.");
} else if (c.playerRights == 3) {
sendMessage("You are Currently Ranked as an: <col=255>Owner</col>.");
}
}

Credits:
Me - 100%

Just a Simple Command

Tavo
September 10th, 2011, 16:30
Interesting command, Ill give it a try on mine. Thanks

317 Delta Coder
September 10th, 2011, 16:31
Try the New one i just edited, I had to fix lol, messed it up on the first part :P

JustinTG
September 10th, 2011, 16:38
Using the new one you just posted I got 1 error.

317 Delta Coder
September 10th, 2011, 16:38
Using the new one you just posted I got 1 error.
Should work now, just fixed

JustinTG
September 10th, 2011, 16:40
It says Myrank)^ error or something

317 Delta Coder
September 10th, 2011, 16:41
It says Myrank)^ error or something
Try again but use the command i jsut posted, I had to fix again lol.

dudeh
September 11th, 2011, 15:01
stil an error, FAIL

317 Delta Coder
September 11th, 2011, 15:08
stil an error, FAIL
Maybe becuz u dont have c.isDonator? YOur dumb lol