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 && 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...