Jump to content

Question

Posted

Hello guys..
I would like to find out if it is possible to make a gatekeeper that will teleport players that are only in a party that has a specific number of member
Example ( If a player is in a 3 member party he can teleport ) if he is not give him a message that says you are not in a party or your party lacks of members
Waiting for an answer pls

7 answers to this question

Recommended Posts

  • 0
Posted (edited)


L2Party party = player.getParty();

 

if (party.getMemberCount() < 3)

{

       player.sendMessage("You need a party with at least 3 members.");

       return;

}

Edited by SweeTs
  • 0
Posted
L2Party party = player.getParty();
 
if (party.getMemberCount() < 3)
{
       player.sendMessage("You need a party with at least 3 members.");
       return;
}

 

NullPointerException

  • 0
Posted (edited)

NullPointerException

You rly expect me to c/p rdy code cuz someone wants it ? :troll:

 

Btw, he was asking only for that and it's obvious to check if the party is not null, so well.. :)

Edited by SweeTs
  • 0
Posted

You rly expect me to c/p rdy code cuz someone wants it ? :troll:

 

Okay, okay.. let it be..

&& player.getParty() != null

Btw, he was asking for that, so well.. :)

 

You still get npe with that one :p

 

it must be player.getParty() != null && 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock