Jump to content
  • 0

How are do delay after @command


azzzura

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  06/12/13
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

 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


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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