Show the code that teleports you to dzone.
|
|
hey i got this pi source
and i wanna know how i can make a random teleport
eksampel i got a command i just made called :: dzone now it will tele me to the donator zone but i want it to make it random so it will randomly teleport in the donatorzone like tele diffrent spots in donatorzone because my donatorzone i seriously big
I WILL REP THE PERSON WHO HELPS ME![]()

Show the code that teleports you to dzone.
2650, 4571
Code:if (playerCommand.startsWith("donatorzone")) { int randomTeleport = Misc.random(5); if(randomTeleport == 1) { c.getPA().movePlayer(x, y, h); } else if (randomTeleport == 2) { c.getPA().movePlayer(x, y, h); } else if (randomTeleport == 3) { c.getPA().movePlayer(x, y, h); } else if (randomTeleport == 4) { c.getPA().movePlayer(x, y, h); } else if (randomTeleport == 5) { c.getPA().movePlayer(x, y, h); } else { c.getPA().movePlayer(x,y,h); } }
didnt work if im not doing it right pleas give a little information

if (playerCommand.startsWith("dzone") && c.isDonator == 1) {
c.getPA().startTeleport(2650, 4571, 1, "modern");
c.sendMessage("<shad=43776><img=0>You teleported to DonatorZone.<img=0>");
}
He made a command for donators, it will take them to the donator zone but only to one spot.. he wants to know how to create a command that will not only take him or whomever types the code in to the donator zone, but also to make them appear in a random spot at the donator zone each time. Instead of appearing at 1 spot everytime the command is used.
yes exactly!!!
| « [PI] Need help with a few errors. [REP] | I think my last Server/forum integration help thread » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |