Jump to content

Question

Posted

hey guys can u help me make my vote reward system to no give rewards to offline traders

 

im using this offline trade system http://www.maxcheaters.com/topic/165825-offline-shop-craft-309-rev/

 

and my check for dual box is

for(L2PcInstance player : pls)
						{
							if(player != null)
							{
								if(checkSingleBox(player))
								{
								   player.addItem("reward", Config.TOPZONE_REWARD_ID, Config.TOPZONE_REWARD_COUNT, player, true);
								}
							}
						}

can u tell me how to fix this?

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

Looks ok, but if you still can get the reward, add as I said before

&& !player.getClient().isDetached()
Edited by SweeTs
  • 0
Posted (edited)

Post checkSingleBox method. Also player cant be null there, drop the null check.

 

You basically have to check !client.isDetached()

Edited by SweeTs
  • 0
Posted


protected boolean checkSingleBox(L2PcInstance player)

{

if(player.getClient()!=null && player.getClient().getConnection()!=null && !player.getClient().getConnection().isClosed()){

 

String playerip = player.getClient().getConnection().getInetAddress().getHostAddress();

 

if(already_rewarded.contains(playerip))

return false;

already_rewarded.add(playerip);

return true;

}

return false;

}

Guest
This topic is now closed to further replies.


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