Jump to content
  • 0

Press Button And Give Reward 30 Sec Later


Question

Posted (edited)

Hi all i need a button special :P

 

- a player press button and 30 sec later he have reward

 

 

thx for your help :)

 

Edited by waikiki

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

Create the function and delay it with a threadpool, something like

ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
{
    @Override
    public void run()
    {
        player.addItem("Reward", 57, 100, player, true);
    }
}, 30000);

else you coul use system time, even better.

Edited by SweeTs
  • 0
Posted

if(command.equalsIgnoreCase"poutsa")

{

ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
{
    @Override
    public void run()
    {
        player.addItem("Reward", 57, 100, player, true);
    }
}, 30000);

 

make it on voicedcommand handler

  • 0
Posted

if(command.equalsIgnoreCase"poutsa")

{

ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()

{

    @Override

    public void run()

    {

        player.addItem("Reward", 57, 100, player, true);

    }

}, 30000);

 

make it on voicedcommand handler

you copy pasted sweets and you added one line which is also wrong. Oh my..

  • 0
Posted

you copy pasted sweets and you added one line which is also wrong. Oh my..

vre den mas gamas k esu kserola ? exeis anoiksei 10 topic gia server k mas exeis taraksi t @@ 

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

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