Jump to content
  • 0
azzzura

How are do delay after @command

Question

Hi, for example i have some command, doesn't matter what is. 

How are can i make this command with some delay, to prevent spam? 

I want some way for make only one command with delay, for example around 5 seconds (5000 miliseconds). How?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

 or  use bindatcmd  script command

 

-    script    asdf    -1,{
end;
OnInit:
    bindatcmd "command", strnpcinfo(0)+"::OnCommand";
    end;
OnCommand:

    if(gettimetic(2) < cooldowntime ){
        dispbottom "Please wait 5 seconds!";
        end;
    }
    atcommand "@command";
    set cooldowntime,gettimetic(2)+5;

    end;
}
  • Upvote 2
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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.