Jump to content
  • 0

Help Help Pls


mikemaster
 Share

Question

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

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0


L2Party party = player.getParty();

 

if (party.getMemberCount() < 3)

{

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

       return;

}

Edited by SweeTs
Link to comment
Share on other sites

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

 

NullPointerException

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

 Share



×
×
  • 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 Disbaled AdBlock